40#ifndef _RTEMS_MALLOC_H
41#define _RTEMS_MALLOC_H
71void _Malloc_Initialize(
void );
73typedef void *(*rtems_heap_extend_handler)(
86void *rtems_heap_null_extend(
91extern const rtems_heap_extend_handler rtems_malloc_extend_handler;
96typedef void (*rtems_malloc_dirtier_t)(
void *, size_t);
97extern rtems_malloc_dirtier_t rtems_malloc_dirty_helper;
112void rtems_heap_set_sbrk_amount( ptrdiff_t sbrk_amount );
185 RTEMS_WARN_UNUSED_RESULT;
248 const uintptr_t *block_sizes,
262 uintptr_t *allocatable_size
This header file provides the kernel character input/output support API.
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:52
Heap_Control * RTEMS_Malloc_Heap
C program heap control.
Definition: mallocheap.c:45
#define RTEMS_ALLOC_ALIGN(_index)
Tells the compiler in a declaration that the memory allocation alignment parameter of this function i...
Definition: basedefs.h:193
#define RTEMS_ALLOC_SIZE(_index)
Tells the compiler in a declaration that the memory allocation size parameter of this function is sim...
Definition: basedefs.h:209
#define RTEMS_ALLOC_SIZE_2(_count_index, _size_index)
Tells the compiler in a declaration that the memory allocation item count and item size parameter of ...
Definition: basedefs.h:230
#define RTEMS_MALLOCLIKE
Tells the compiler in a declaration that this function is a memory allocation function similar to mal...
Definition: basedefs.h:648
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
void * rtems_heap_allocate_aligned_with_boundary(size_t size, uintptr_t alignment, uintptr_t boundary) RTEMS_MALLOCLIKE RTEMS_ALLOC_SIZE(1) RTEMS_ALLOC_ALIGN(2) RTEMS_WARN_UNUSED_RESULT
Allocates a memory area of size size bytes from the heap.
void rtems_malloc_dirty_memory(void *start, size_t size)
Dirty Memory Function.
Definition: malloc_dirtier.c:47
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:43
void * rtems_malloc(size_t size) RTEMS_MALLOCLIKE RTEMS_ALLOC_SIZE(1) RTEMS_WARN_UNUSED_RESULT
Allocates a memory area of the specified size from the heap.
int rtems_memalign(void **pointer, size_t alignment, size_t size)
RTEMS Variation on Aligned Memory Allocation.
void rtems_heap_greedy_free(void *opaque)
Frees space of a greedy allocation.
Definition: rtems_heap_greedy.c:79
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:60
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_sbrk_greedy_allocate(Heap_Control *heap, size_t alloc_size)
Greedy allocate that empties the sbrk memory.
Definition: rtems_heap_sbrk_greedy.c:48
void * rtems_calloc(size_t nelem, size_t elsize) RTEMS_MALLOCLIKE RTEMS_ALLOC_SIZE_2(1
Allocates a memory area for the specified count of elements from the heap.
Standard C Library Support.
This header file defines the RTEMS Classic API.
Control block used to manage a heap.
Definition: heap.h:339