RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
24extern "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
116void* rtems_rtl_alloc_new (rtems_rtl_alloc_tag tag, size_t size, bool zero);
117
124void rtems_rtl_alloc_del (rtems_rtl_alloc_tag tag, void* address);
125
133void rtems_rtl_alloc_lock (void);
134
142void rtems_rtl_alloc_unlock (void);
143
150void rtems_rtl_alloc_wr_enable (rtems_rtl_alloc_tag tag, void* address);
151
158void 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
244bool 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
259void 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
rtems_rtl_alloc_tag rtems_rtl_alloc_bss_tag(void)
Definition: rtl-allocator.c:246
void rtems_rtl_alloc_indirect_new(rtems_rtl_alloc_tag tag, rtems_rtl_ptr *handle, size_t size)
Definition: rtl-allocator.c:172
rtems_rtl_alloc_tag rtems_rtl_alloc_text_tag(void)
Definition: rtl-allocator.c:222
void rtems_rtl_alloc_unlock(void)
Definition: rtl-allocator.c:129
void rtems_rtl_alloc_initialise(rtems_rtl_alloc_data *data)
Definition: rtl-allocator.c:42
rtems_rtl_allocator rtems_rtl_alloc_hook(rtems_rtl_allocator handler)
Definition: rtl-allocator.c:162
void rtems_rtl_alloc_wr_enable(rtems_rtl_alloc_tag tag, void *address)
Definition: rtl-allocator.c:94
enum rtems_rtl_alloc_tags rtems_rtl_alloc_tag
Definition: rtl-allocator.h:45
void rtems_rtl_alloc_del(rtems_rtl_alloc_tag tag, void *address)
Definition: rtl-allocator.c:79
#define RTEMS_RTL_ALLOC_TAGS
Definition: rtl-allocator.h:67
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_rtl_alloc_tags
Definition: rtl-allocator.h:33
@ RTEMS_RTL_ALLOC_READ
Definition: rtl-allocator.h:37
@ RTEMS_RTL_ALLOC_READ_EXEC
Definition: rtl-allocator.h:39
@ RTEMS_RTL_ALLOC_EXTERNAL
Definition: rtl-allocator.h:36
@ RTEMS_RTL_ALLOC_SYMBOL
Definition: rtl-allocator.h:35
@ RTEMS_RTL_ALLOC_READ_WRITE
Definition: rtl-allocator.h:38
@ RTEMS_RTL_ALLOC_OBJECT
Definition: rtl-allocator.h:34
void rtems_rtl_alloc_wr_disable(rtems_rtl_alloc_tag tag, void *address)
Definition: rtl-allocator.c:145
void * rtems_rtl_alloc_new(rtems_rtl_alloc_tag tag, size_t size, bool zero)
Definition: rtl-allocator.c:51
void(* rtems_rtl_allocator)(rtems_rtl_alloc_cmd cmd, rtems_rtl_alloc_tag tag, void **address, size_t size)
Definition: rtl-allocator.h:83
rtems_rtl_alloc_cmd
Definition: rtl-allocator.h:50
@ RTEMS_RTL_ALLOC_UNLOCK
Definition: rtl-allocator.h:54
@ RTEMS_RTL_ALLOC_DEL
Definition: rtl-allocator.h:52
@ RTEMS_RTL_ALLOC_NEW
Definition: rtl-allocator.h:51
@ RTEMS_RTL_ALLOC_WR_ENABLE
Definition: rtl-allocator.h:55
@ RTEMS_RTL_ALLOC_LOCK
Definition: rtl-allocator.h:53
@ RTEMS_RTL_ALLOC_WR_DISABLE
Definition: rtl-allocator.h:56
rtems_rtl_alloc_tag rtems_rtl_alloc_data_tag(void)
Definition: rtl-allocator.c:240
rtems_rtl_alloc_tag rtems_rtl_alloc_eh_tag(void)
Definition: rtl-allocator.c:234
rtems_rtl_alloc_tag rtems_rtl_alloc_const_tag(void)
Definition: rtl-allocator.c:228
void rtems_rtl_alloc_lock(void)
Definition: rtl-allocator.c:111
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
void rtems_rtl_alloc_indirect_del(rtems_rtl_alloc_tag tag, rtems_rtl_ptr *handle)
Definition: rtl-allocator.c:200
RTEMS Run-Time Linker Indirect Pointer Management allows memory compaction in the allocator.
Definition: rtl-allocator.h:91
rtems_rtl_allocator allocator
Definition: rtl-allocator.h:93
Definition: rtl-indirect-ptr.h:29
unsigned size
Definition: tte.h:1
Definition: chain.h:86