37#ifndef _RTEMS_MALLOCINITMULTI_H
38#define _RTEMS_MALLOCINITMULTI_H
57static inline Heap_Control *_Malloc_Initialize_for_multiple_areas(
67 RTEMS_Malloc_Heap = heap;
69 page_size = CPU_HEAP_ALIGNMENT;
71 for (i = 0; i < _Memory_Get_count( mem ); ++i) {
73 uintptr_t space_available;
75 area = _Memory_Get_area( mem, i );
76 space_available = ( *init_or_extend )(
78 _Memory_Get_free_begin( area ),
79 _Memory_Get_free_size( area ),
83 if ( space_available > 0 ) {
84 _Memory_Consume( area, _Memory_Get_free_size( area ) );
uintptr_t _Heap_Extend(Heap_Control *heap, void *area_begin, uintptr_t area_size, uintptr_t unused)
Extends the memory available for the heap.
Definition: heapextend.c:139
uintptr_t(* Heap_Initialization_or_extend_handler)(Heap_Control *heap, void *area_begin, uintptr_t area_size, uintptr_t page_size_or_unused)
Heap initialization and extend handler type.
Definition: heap.h:373
uintptr_t _Heap_Initialize(Heap_Control *heap, void *area_begin, uintptr_t area_size, uintptr_t page_size)
Initializes the heap control block.
Definition: heap.c:225
RTEMS_NO_RETURN void _Internal_error(Internal_errors_Core_list core_error)
Terminates the system with an INTERNAL_ERROR_CORE fatal source and the specified core error code.
Definition: interr.c:61
const Memory_Information * _Memory_Get(void)
Return the memory information of this platform.
Definition: bspgetworkarea.c:227
This header file provides interfaces of the Barrier Handler which are only used by the implementation...
This header file defines interfaces to support and use dynamic memory allocation.
Control block used to manage a heap.
Definition: heap.h:339
The memory area description.
Definition: memory.h:63