elpekenin/utils/memory.h

Tiny memory-usage and address “identification” functions.


bool ptr_in_heap(const void *addr)
[source]

Check if the input pointer belongs to the heap.

bool ptr_in_main_stack(const void *addr)
[source]

Check if the input pointer belongs to the main stack.

bool ptr_in_process_stack(const void *addr)
[source]

Check if the input pointer belongs to the process stack.

bool ptr_in_stack(const void *addr)
[source]

Check if the input pointer belongs to either stack.

size_t get_heap_size(void)
[source]

Get the total size of the heap section.

size_t get_used_flash(void)
[source]

Get amount of flash consumed by binary.

size_t get_flash_size(void)
[source]

Get total size of the flash memory.