43struct tommy_allocator_entry_struct {
44 struct tommy_allocator_entry_struct* next;
46typedef struct tommy_allocator_entry_struct tommy_allocator_entry;
Allocator of fixed size blocks.
Definition: tommyalloc.h:51
struct tommy_allocator_entry_struct * free_block
List of free blocks.
Definition: tommyalloc.h:52
struct tommy_allocator_entry_struct * used_segment
List of allocated segments.
Definition: tommyalloc.h:53
tommy_size_t count
Number of allocated elements.
Definition: tommyalloc.h:56
tommy_size_t block_size
Block size.
Definition: tommyalloc.h:54
tommy_size_t align_size
Alignment size.
Definition: tommyalloc.h:55
TOMMY_API void tommy_allocator_free(tommy_allocator *alloc, void *ptr)
Deallocates a block.
TOMMY_API void tommy_allocator_done(tommy_allocator *alloc)
Deinitializes the allocator.
TOMMY_API tommy_size_t tommy_allocator_memory_usage(tommy_allocator *alloc)
Gets the size of allocated memory.
TOMMY_API void * tommy_allocator_alloc(tommy_allocator *alloc)
Allocates a block.
struct tommy_allocator_struct tommy_allocator
Allocator of fixed size blocks.
TOMMY_API void tommy_allocator_init(tommy_allocator *alloc, tommy_size_t block_size, tommy_size_t align_size)
Initializes the allocator.
uint64_t tommy_size_t
Generic size_t type.
Definition: tommytypes.h:60