![]() |
SyterKit 0.4.0.x
SyterKit is a bare-metal framework
|
#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <string.h>#include <types.h>#include "smalloc.h"
Functions | |
| int32_t | smalloc_init (uint32_t p_heap_head, uint32_t n_heap_size) |
| Initialize the simple malloc library with the specified heap parameters. | |
| void * | smalloc (uint32_t num_bytes) |
| Allocate a block of memory from the heap with the specified size. | |
| void * | srealloc (void *p, uint32_t num_bytes) |
| Reallocate a block of memory with the specified new size. | |
| void | sfree (void *p) |
| Free the memory block pointed to by the specified pointer. | |
Variables | |
| static struct alloc_struct_t boot_heap_head | boot_heap_tail |
| void sfree | ( | void * | p | ) |
Free the memory block pointed to by the specified pointer.
| p | The pointer to the memory block to free. |
| void * smalloc | ( | uint32_t | num_bytes | ) |
Allocate a block of memory from the heap with the specified size.
| num_bytes | The number of bytes to allocate. |
Initialize the simple malloc library with the specified heap parameters.
| p_heap_head | The starting address of the heap. |
| n_heap_size | The size of the heap in bytes. |
| void * srealloc | ( | void * | p, |
| uint32_t | num_bytes | ||
| ) |
Reallocate a block of memory with the specified new size.
| p | The pointer to the memory block to reallocate. |
| num_bytes | The new size in bytes. |
|
static |