Sturk 1.0.2
Publish-subscribe C implementation.
|
System memory allocator. More...
#include <stddef.h>
Go to the source code of this file.
Macros | |
#define | ST_NEW(...) ST__NEW(__VA_ARGS__, 1, ) |
Allocate memory for a data type. | |
Functions | |
void * | st_malloc (size_t size) |
void | st_free (void *ptr) |
System memory allocator.
#define ST_NEW | ( | ... | ) | ST__NEW(__VA_ARGS__, 1, ) |
Allocate memory for a data type.
A call ST_NEW(type, n) will alocate contiguous memory region of the length that is equal to the multiple of n and the size of type. The n argument is optional and by default it equals 1.
void st_free | ( | void * | ptr | ) |
void * st_malloc | ( | size_t | size | ) |