16 #ifndef _RTEMS_MALLOC_H 17 #define _RTEMS_MALLOC_H 45 void RTEMS_Malloc_Initialize(
51 extern ptrdiff_t RTEMS_Malloc_Sbrk_amount;
53 static inline void rtems_heap_set_sbrk_amount( ptrdiff_t sbrk_amount )
55 RTEMS_Malloc_Sbrk_amount = sbrk_amount;
58 typedef void *(*rtems_heap_extend_handler)(
71 void *rtems_heap_null_extend(
76 extern const rtems_heap_extend_handler rtems_malloc_extend_handler;
81 typedef void (*rtems_malloc_dirtier_t)(
void *, size_t);
82 extern rtems_malloc_dirtier_t rtems_malloc_dirty_helper;
171 const uintptr_t *block_sizes,
185 uintptr_t *allocatable_size
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:405
Heap_Control * RTEMS_Malloc_Heap
C program heap control.
Heap area structure for table based heap initialization and extension.
Definition: heap.h:391
void rtems_malloc_dirty_memory(void *start, size_t size)
Dirty Memory Function.
Definition: malloc_dirtier.c:28
void * rtems_heap_greedy_allocate(const uintptr_t *block_sizes, size_t block_count)
Greedy allocate that empties the heap.
Definition: rtems_heap_greedy.c:28
void rtems_heap_greedy_free(void *opaque)
Frees space of a greedy allocation.
Definition: rtems_heap_greedy.c:58
rtems_status_code
Classic API Status.
Definition: status.h:46
Control block used to manage a heap.
Definition: heap.h:342
void * rtems_heap_allocate_aligned_with_boundary(size_t size, uintptr_t alignment, uintptr_t boundary)
Allocates a memory area of size size bytes from the heap.
Standard C Library Support.
Interface to Kernel Print Methods.
void * rtems_heap_greedy_allocate_all_except_largest(uintptr_t *allocatable_size)
Greedy allocate all blocks except the largest free block.
Definition: rtems_heap_greedy.c:42
int rtems_memalign(void **pointer, size_t alignment, size_t size)
RTEMS Variation on Aligned Memory Allocation.
rtems_status_code rtems_heap_extend(void *area_begin, uintptr_t area_size)
Extends the memory available for the heap using the memory area starting at area_begin of size area_s...
void * rtems_heap_extend_via_sbrk(Heap_Control *heap, size_t alloc_size)
RTEMS Extend Heap via Sbrk.
Definition: rtems_heap_extend_via_sbrk.c:34