37#ifndef _RTEMS_SCORE_MEMORY_H
38#define _RTEMS_SCORE_MEMORY_H
100#define MEMORY_INFORMATION_INITIALIZER( areas ) \
101 { RTEMS_ARRAY_SIZE( areas ), ( areas ) }
109#define MEMORY_INITIALIZER( begin, end ) { ( begin ), ( begin ), ( end ) }
118static inline size_t _Memory_Get_count(
122 return information->
count;
138 _Assert( index < _Memory_Get_count( information ) );
139 return &information->
areas[ index ];
149static inline void _Memory_Initialize(
167static inline void _Memory_Initialize_by_size(
175 area->
end = (
char *) begin + size;
185static inline const void *_Memory_Get_begin(
const Memory_Area *area )
196static inline void _Memory_Set_begin(
211static inline const void *_Memory_Get_end(
const Memory_Area *area )
222static inline void _Memory_Set_end(
237static inline uintptr_t _Memory_Get_size(
const Memory_Area *area )
239 return (uintptr_t) area->
end - (uintptr_t) area->
begin;
249static inline void *_Memory_Get_free_begin(
const Memory_Area *area )
260static inline void _Memory_Set_free_begin(
275static inline uintptr_t _Memory_Get_free_size(
const Memory_Area *area )
277 return (uintptr_t) area->
end - (uintptr_t) area->
free;
288static inline void _Memory_Consume(
293 area->
free = (
char *) area->
free + consume;
This header file provides the interfaces of the Assert Handler.
This header file provides basic definitions used by the API and the implementation.
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG and static analysis runs.
Definition: assert.h:96
char _Memory_Noinit_end[]
This symbol marks the end of the non-initialized section used by RTEMS.
const Memory_Information * _Memory_Get(void)
Return the memory information of this platform.
Definition: bspgetworkarea.c:227
const bool _Memory_Zero_before_use
Indicates if the memory is zeroed during system initialization.
Definition: memoryzerobeforeuse.c:43
void _Memory_Dirty_free_areas(void)
Dirty all free memory areas of the system.
Definition: memorydirtyfreeareas.c:45
void * _Memory_Allocate(const Memory_Information *information, uintptr_t size, uintptr_t alignment)
Allocate a memory area from the memory information.
Definition: memoryallocate.c:43
void _Memory_Zero_free_areas(void)
Zeros all free memory areas of the system.
Definition: memoryzerofreeareas.c:45
void _Memory_Fill(const Memory_Information *information, int c)
Fill all free memory areas of the memory information with a constant byte.
Definition: memoryfill.c:45
char _Memory_Noinit_begin[]
This symbol marks the begin of the non-initialized section used by RTEMS.
The memory area description.
Definition: memory.h:63
const void * end
A pointer to the end of the memory area.
Definition: memory.h:77
const void * begin
A pointer to the begin of the memory area.
Definition: memory.h:67
void * free
A pointer to the begin of the free area of the memory area.
Definition: memory.h:72