ChibiOS 21.11.4
chmemheaps.h File Reference

Memory heaps macros and structures. More...

Go to the source code of this file.

Data Structures

union  heap_header
 Memory heap block header. More...
struct  memory_heap
 Structure describing a memory heap. More...

Macros

#define CH_HEAP_ALIGNMENT   8U
 Minimum alignment used for heap.
#define CH_HEAP_AREA(name, size)
 Allocation of an aligned static heap buffer.

Typedefs

typedef struct memory_heap memory_heap_t
 Type of a memory heap.
typedef union heap_header heap_header_t
 Type of a memory heap header.

Functions

void __heap_init (void)
 Initializes the default heap.
void chHeapObjectInit (memory_heap_t *heapp, void *buf, size_t size)
 Initializes a memory heap from a static memory area.
void * chHeapAllocAligned (memory_heap_t *heapp, size_t size, unsigned align)
 Allocates a block of memory from the heap by using the first-fit algorithm.
void chHeapFree (void *p)
 Frees a previously allocated memory block.
size_t chHeapStatus (memory_heap_t *heapp, size_t *totalp, size_t *largestp)
 Reports the heap status.
static void * chHeapAlloc (memory_heap_t *heapp, size_t size)
 Allocates a block of memory from the heap by using the first-fit algorithm.
static size_t chHeapGetSize (const void *p)
 Returns the size of an allocated block.

Detailed Description

Memory heaps macros and structures.

Definition in file chmemheaps.h.