RTEMS  5.1
rtl-allocator.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj@rtems.org>
3  *
4  * The license and distribution terms for this file may be
5  * found in the file LICENSE in this distribution or at
6  * http://www.rtems.org/license/LICENSE.
7  */
16 #if !defined (_RTEMS_RTL_ALLOCATOR_H_)
17 #define _RTEMS_RTL_ALLOCATOR_H_
18 
19 #include <stdbool.h>
20 
21 #include "rtl-indirect-ptr.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26 
40 };
41 
46 
57 };
58 
63 
67 #define RTEMS_RTL_ALLOC_TAGS ((size_t) (RTEMS_RTL_ALLOC_READ_EXEC + 1))
68 
85  void** address,
86  size_t size);
87 
96 };
97 
99 
106 
116 void* rtems_rtl_alloc_new (rtems_rtl_alloc_tag tag, size_t size, bool zero);
117 
124 void rtems_rtl_alloc_del (rtems_rtl_alloc_tag tag, void* address);
125 
133 void rtems_rtl_alloc_lock (void);
134 
142 void rtems_rtl_alloc_unlock (void);
143 
150 void rtems_rtl_alloc_wr_enable (rtems_rtl_alloc_tag tag, void* address);
151 
158 void rtems_rtl_alloc_wr_disable (rtems_rtl_alloc_tag tag, void* address);
159 
170 
179  rtems_rtl_ptr* handle,
180  size_t size);
181 
189  rtems_rtl_ptr* handle);
190 
197 
204 
211 
218 
225 
244 bool rtems_rtl_alloc_module_new (void** text_base, size_t text_size,
245  void** const_base, size_t const_size,
246  void** eh_base, size_t eh_size,
247  void** data_base, size_t data_size,
248  void** bss_base, size_t bss_size);
249 
259 void rtems_rtl_alloc_module_del (void** text_base, void** const_base,
260  void** eh_base, void** data_base,
261  void** bss_base);
262 
263 #ifdef __cplusplus
264 }
265 #endif /* __cplusplus */
266 
267 #endif
void rtems_rtl_alloc_module_del(void **text_base, void **const_base, void **eh_base, void **data_base, void **bss_base)
Definition: rtl-allocator.c:322
RTEMS Run-Time Linker Indirect Pointer Management allows memory compaction in the allocator.
void rtems_rtl_alloc_indirect_new(rtems_rtl_alloc_tag tag, rtems_rtl_ptr *handle, size_t size)
Definition: rtl-allocator.c:172
Definition: rtl-allocator.h:56
Definition: rtl-indirect-ptr.h:29
rtems_rtl_allocator rtems_rtl_alloc_hook(rtems_rtl_allocator handler)
Definition: rtl-allocator.c:162
rtems_rtl_alloc_cmd
Definition: rtl-allocator.h:50
void rtems_rtl_alloc_lock(void)
Definition: rtl-allocator.c:111
Definition: chain.h:86
void rtems_rtl_alloc_initialise(rtems_rtl_alloc_data *data)
Definition: rtl-allocator.c:42
Definition: rtl-allocator.h:38
Definition: rtl-allocator.h:55
rtems_rtl_allocator allocator
Definition: rtl-allocator.h:93
void rtems_rtl_alloc_unlock(void)
Definition: rtl-allocator.c:129
void(* rtems_rtl_allocator)(rtems_rtl_alloc_cmd cmd, rtems_rtl_alloc_tag tag, void **address, size_t size)
Definition: rtl-allocator.h:83
Definition: rtl-allocator.h:53
enum rtems_rtl_alloc_tags rtems_rtl_alloc_tag
Definition: rtl-allocator.h:45
Definition: rtl-allocator.h:37
#define RTEMS_RTL_ALLOC_TAGS
Definition: rtl-allocator.h:67
rtems_rtl_alloc_tag rtems_rtl_alloc_data_tag(void)
Definition: rtl-allocator.c:240
void rtems_rtl_alloc_wr_disable(rtems_rtl_alloc_tag tag, void *address)
Definition: rtl-allocator.c:145
rtems_rtl_alloc_tag rtems_rtl_alloc_text_tag(void)
Definition: rtl-allocator.c:222
Definition: rtl-allocator.h:39
Definition: rtl-allocator.h:54
bool rtems_rtl_alloc_module_new(void **text_base, size_t text_size, void **const_base, size_t const_size, void **eh_base, size_t eh_size, void **data_base, size_t data_size, void **bss_base, size_t bss_size)
Definition: rtl-allocator.c:252
rtems_rtl_alloc_tag rtems_rtl_alloc_const_tag(void)
Definition: rtl-allocator.c:228
void rtems_rtl_alloc_del(rtems_rtl_alloc_tag tag, void *address)
Definition: rtl-allocator.c:79
void rtems_rtl_alloc_wr_enable(rtems_rtl_alloc_tag tag, void *address)
Definition: rtl-allocator.c:94
Definition: rtl-allocator.h:34
rtems_rtl_alloc_tag rtems_rtl_alloc_bss_tag(void)
Definition: rtl-allocator.c:246
void rtems_rtl_alloc_indirect_del(rtems_rtl_alloc_tag tag, rtems_rtl_ptr *handle)
Definition: rtl-allocator.c:200
Definition: rtl-allocator.h:51
Definition: rtl-allocator.h:36
rtems_rtl_alloc_tags
Definition: rtl-allocator.h:33
Definition: rtl-allocator.h:91
Definition: rtl-allocator.h:35
unsigned size
Definition: tte.h:74
Definition: rtl-allocator.h:52
rtems_rtl_alloc_tag rtems_rtl_alloc_eh_tag(void)
Definition: rtl-allocator.c:234
void * rtems_rtl_alloc_new(rtems_rtl_alloc_tag tag, size_t size, bool zero)
Definition: rtl-allocator.c:51