|
LMMS
|
#include <stdbool.h>#include <stddef.h>Go to the source code of this file.
Macros | |
| #define | RTSAFE_MEMORY_POOL_NAME_MAX 128 |
Typedefs | |
| typedef void * | RtMemPool_Handle |
Functions | |
| bool | rtsafe_memory_pool_create (RtMemPool_Handle *handlePtr, const char *poolName, size_t dataSize, size_t minPreallocated, size_t maxPreallocated) |
| void | rtsafe_memory_pool_destroy (RtMemPool_Handle handle) |
| void * | rtsafe_memory_pool_allocate_atomic (RtMemPool_Handle handle) |
| void * | rtsafe_memory_pool_allocate_sleepy (RtMemPool_Handle handle) |
| void | rtsafe_memory_pool_deallocate (RtMemPool_Handle handle, void *memoryPtr) |
| #define RTSAFE_MEMORY_POOL_NAME_MAX 128 |
max size of memory pool name, in chars, including terminating zero char
| typedef void* RtMemPool_Handle |
Opaque data for RtMemPool_Pool.
| void * rtsafe_memory_pool_allocate_atomic | ( | RtMemPool_Handle | handle | ) |
Allocate memory in context where sleeping is not allowed
will not sleep
| void * rtsafe_memory_pool_allocate_sleepy | ( | RtMemPool_Handle | handle | ) |
Allocate memory in context where sleeping is allowed
may/will sleep
| bool rtsafe_memory_pool_create | ( | RtMemPool_Handle * | handlePtr, |
| const char * | poolName, | ||
| size_t | dataSize, | ||
| size_t | minPreallocated, | ||
| size_t | maxPreallocated ) |
Create new memory pool
may/will sleep
| poolName | pool name, for debug purposes, max RTSAFE_MEMORY_POOL_NAME_MAX chars, including terminating zero char. May be NULL. |
| dataSize | memory chunk size |
| minPreallocated | min chunks preallocated |
| maxPreallocated | max chunks preallocated |
| void rtsafe_memory_pool_deallocate | ( | RtMemPool_Handle | handle, |
| void * | memoryPtr ) |
Deallocate previously allocated memory
will not sleep
| memoryPtr | pointer to previously allocated memory chunk |
| void rtsafe_memory_pool_destroy | ( | RtMemPool_Handle | handle | ) |
Destroy previously created memory pool
may/will sleep