MicrOS
|
#include "micros_heap.h"
Functions | |
void * | micros_heap_alloc (uint32_t size, uint32_t align) |
Allocates chunk of memory with the specified size and alignment. More... | |
void * | micros_heap_realloc (void *ptr, uint32_t size) |
Reallocates chunk of memory with the specified size. More... | |
void | micros_heap_dealloc (void *ptr) |
Deallocates chunk of memory. More... | |
uint32_t | micros_heap_get_object_size (void *ptr) |
Retrieves size of the heap object. More... | |
bool | micros_heap_verify_integrity () |
Verifies heap integrity. More... | |
micros_heap_entry * | micros_heap_get_process_heap () |
Retrieves application heap. More... | |
void * | micros_heap_kernel_alloc (uint32_t size, uint32_t align) |
void * | micros_heap_kernel_dealloc (void *address) |
Allocates chunk of memory with the specified size and alignment.
Allocates chunk of memory with the specified size and alignment. Then returns pointer if success or 0 if there is not enough memory.
size | Size of the requested chunk of memory. |
align | Alignment of the requested chunk of memory. |
void micros_heap_dealloc | ( | void * | ptr | ) |
Deallocates chunk of memory.
Deallocates chunk of memory passed in the parameter.
ptr | Pointer to the existing heap entry. |
uint32_t micros_heap_get_object_size | ( | void * | ptr | ) |
Retrieves size of the heap object.
Retrieves size of the heap object passed in the parameter.
ptr | Pointer to the existing heap entry. |
micros_heap_entry* micros_heap_get_process_heap | ( | ) |
Retrieves application heap.
Retrieves application heap by returning first first entry.
void* micros_heap_kernel_dealloc | ( | void * | address | ) |
void* micros_heap_realloc | ( | void * | ptr, |
uint32_t | size | ||
) |
Reallocates chunk of memory with the specified size.
Reallocates chunk of memory with the specified size. Then returns pointer if success or 0 if there is not enough memory.
ptr | Pointer to the existing heap entry. |
size | Size of the requested chunk of memory. |
bool micros_heap_verify_integrity | ( | ) |
Verifies heap integrity.
Verifies heap integrity (objects aren't overlapping and sizes are correctly set) and returns boolean with result.