Loading...
Searching...
No Matches
memmgr.h File Reference

Furi: memory management API and glue. More...

#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "check.h"

Go to the source code of this file.

Macros

#define FURI_MEMMGR_GUARD   1
 

Functions

size_t memmgr_get_free_heap (void)
 Get free heap size.
 
size_t memmgr_get_total_heap (void)
 Get total heap size.
 
size_t memmgr_get_minimum_free_heap (void)
 Get heap watermark.
 
void * aligned_malloc (size_t size, size_t alignment)
 An aligned version of malloc, used when you need to get the aligned space on the heap Freeing the received address is performed ONLY through the aligned_free function.
 
void aligned_free (void *p)
 Freed space obtained through the aligned_malloc function.
 
void * memmgr_alloc_from_pool (size_t size)
 Allocate memory from separate memory pool.
 
size_t memmgr_pool_get_free (void)
 Get free memory pool size.
 
size_t memmgr_pool_get_max_block (void)
 Get max free block size from memory pool.
 

Detailed Description

Furi: memory management API and glue.

Function Documentation

◆ aligned_free()

void aligned_free ( void * p)

Freed space obtained through the aligned_malloc function.

Parameters
ppointer to result of aligned_malloc

◆ aligned_malloc()

void * aligned_malloc ( size_t size,
size_t alignment )

An aligned version of malloc, used when you need to get the aligned space on the heap Freeing the received address is performed ONLY through the aligned_free function.

Parameters
size
alignment
Returns
void*

◆ memmgr_alloc_from_pool()

void * memmgr_alloc_from_pool ( size_t size)

Allocate memory from separate memory pool.

That memory can't be freed.

Parameters
size
Returns
void*

◆ memmgr_get_free_heap()

size_t memmgr_get_free_heap ( void )

Get free heap size.

Returns
free heap size in bytes

◆ memmgr_get_minimum_free_heap()

size_t memmgr_get_minimum_free_heap ( void )

Get heap watermark.

Returns
minimum heap in bytes

◆ memmgr_get_total_heap()

size_t memmgr_get_total_heap ( void )

Get total heap size.

Returns
total heap size in bytes

◆ memmgr_pool_get_free()

size_t memmgr_pool_get_free ( void )

Get free memory pool size.

Returns
size_t

◆ memmgr_pool_get_max_block()

size_t memmgr_pool_get_max_block ( void )

Get max free block size from memory pool.

Returns
size_t