11 #ifndef __shinyAllocator_h
12 #define __shinyAllocator_h
26 #define SHINYALLOCATOR_VERSION_MAJOR 1
27 #define SHINYALLOCATOR_VERSION_MINOR 0
33 #define SHINYALLOCATOR_ALIGNMENT (sizeof(void *) * 4U)
void shinyFree(shinyAllocatorInstance *const handle, void *const pointer)
Frees the memory allocated to the given the pool handle.
Definition: shinyAllocator.c:515
int_fast8_t SHINY_STATUS
Definition: shinyAllocator.h:40
shinyAllocatorThreadSafeInstance * shinyInitThreadSafe(void *const base, const size_t size)
Initializes a thread-safe shinyAllocator instance.
Definition: shinyAllocator.c:592
void * shinyAllocate(shinyAllocatorInstance *const handle, const size_t amount)
Allocated the requested memory to the given the pool handle, returns NULL if it fails.
Definition: shinyAllocator.c:439
shinyAllocatorDiagnostics shinyGetDiagnostics(shinyAllocatorInstance *handle)
Definition: shinyAllocator.c:377
shinyAllocatorDiagnostics shinyGetDiagnosticsThreadSafe(shinyAllocatorThreadSafeInstance *const threadSafeHandle)
Thread-safe wrapper for shinyGetDiagnostics().
Definition: shinyAllocator.c:581
size_t sizeof_shinyAllocatorThreadSafeInstance(void)
Definition: shinyAllocator.c:372
shinyAllocatorInstance * shinyInit(void *const base, const size_t size)
Initializes the shinyAllocator for the given base pointer and size.
Definition: shinyAllocator.c:392
SHINY_STATUS shinyDeinitThreadSafe(shinyAllocatorThreadSafeInstance *const threadSafeHandle)
Deinitializes a thread-safe shinyAllocator instance.
Definition: shinyAllocator.c:657
size_t sizeof_shinyAllocatorInstance(void)
Definition: shinyAllocator.c:368
void * shinyAllocateThreadSafe(shinyAllocatorThreadSafeInstance *const threadSafeHandle, const size_t amount)
Allocates memory from a thread-safe shinyAllocator instance.
Definition: shinyAllocator.c:630
SHINY_STATUS shinyFreeThreadSafe(shinyAllocatorThreadSafeInstance *const threadSafeHandle, void *const pointer)
Frees memory allocated by a thread-safe shinyAllocator instance.
Definition: shinyAllocator.c:645
shinyAllocator instance
Definition: shinyAllocator.h:54
size_t peakRequestSize
Definition: shinyAllocator.h:58
size_t capacity
Definition: shinyAllocator.h:55
size_t outOfMemeoryCount
Definition: shinyAllocator.h:59
size_t peakAllocated
Definition: shinyAllocator.h:57
size_t allocated
Definition: shinyAllocator.h:56
the allocator which stores the information about the pool structure
Definition: shinyAllocator.c:219
Initializes the allocator.
Definition: shinyAllocator.c:232
shinyAllocatorInstance * handle
Definition: shinyAllocator.c:234