Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sys_heap.h File Reference
#include <stddef.h>
#include <stdbool.h>
#include <zephyr/types.h>
#include <zephyr/sys/mem_stats.h>
#include <zephyr/toolchain.h>

Go to the source code of this file.

Data Structures

struct  sys_heap
 

Macros

#define sys_heap_realloc(heap, ptr, bytes)
 

Functions

void sys_heap_init (struct sys_heap *heap, void *mem, size_t bytes)
 Initialize sys_heap.
 
void * sys_heap_alloc (struct sys_heap *heap, size_t bytes)
 Allocate memory from a sys_heap.
 
void * sys_heap_aligned_alloc (struct sys_heap *heap, size_t align, size_t bytes)
 Allocate aligned memory from a sys_heap.
 
void sys_heap_free (struct sys_heap *heap, void *mem)
 Free memory into a sys_heap.
 
void * sys_heap_aligned_realloc (struct sys_heap *heap, void *ptr, size_t align, size_t bytes)
 Expand the size of an existing allocation.
 
size_t sys_heap_usable_size (struct sys_heap *heap, void *mem)
 Return allocated memory size.
 
static bool sys_heap_validate (struct sys_heap *heap)
 Validate heap integrity.
 
void sys_heap_stress (void *(*alloc_fn)(void *arg, size_t bytes), void(*free_fn)(void *arg, void *p), void *arg, size_t total_bytes, uint32_t op_count, void *scratch_mem, size_t scratch_bytes, int target_percent, struct z_heap_stress_result *result)
 sys_heap stress test rig
 
void sys_heap_print_info (struct sys_heap *heap, bool dump_chunks)
 Print heap internal structure information to the console.