Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
multi_heap.h File Reference
#include <zephyr/types.h>

Go to the source code of this file.

Data Structures

struct  sys_multi_heap_rec
 
struct  sys_multi_heap
 

Macros

#define MAX_MULTI_HEAPS   8
 
#define sys_multi_heap_realloc(mheap, cfg, ptr, bytes)
 

Typedefs

typedef void *(* sys_multi_heap_fn_t) (struct sys_multi_heap *mheap, void *cfg, size_t align, size_t size)
 Multi-heap choice function.
 

Functions

void sys_multi_heap_init (struct sys_multi_heap *heap, sys_multi_heap_fn_t choice_fn)
 Initialize multi-heap.
 
void sys_multi_heap_add_heap (struct sys_multi_heap *mheap, struct sys_heap *heap, void *user_data)
 Add sys_heap to multi heap.
 
void * sys_multi_heap_alloc (struct sys_multi_heap *mheap, void *cfg, size_t bytes)
 Allocate memory from multi heap.
 
void * sys_multi_heap_aligned_alloc (struct sys_multi_heap *mheap, void *cfg, size_t align, size_t bytes)
 Allocate aligned memory from multi heap.
 
const struct sys_multi_heap_recsys_multi_heap_get_heap (const struct sys_multi_heap *mheap, void *addr)
 Get a specific heap for provided address.
 
void sys_multi_heap_free (struct sys_multi_heap *mheap, void *block)
 Free memory allocated from multi heap.
 
void * sys_multi_heap_aligned_realloc (struct sys_multi_heap *mheap, void *cfg, void *ptr, size_t align, size_t bytes)
 Expand the size of an existing allocation on the multi heap.
 

Macro Definition Documentation

◆ MAX_MULTI_HEAPS

#define MAX_MULTI_HEAPS   8