Files
Allocator/include/lae_allocator.h
2026-06-08 17:53:33 -06:00

26 lines
461 B
C

#ifndef LAE_ALLOCATOR_H
#define LAE_ALLOCATOR_H
#include <stdlib.h>
typedef struct Allocator Allocator;
Allocator allocator_default(void);
struct Allocator {
void *ctx;
void *(*alloc)(void *ctx, size_t size, size_t alignment);
void *(*realloc)(
void *ctx,
void *ptr,
size_t old_size,
size_t new_size,
size_t alignment);
void (*free)(void *ctx, void *ptr, size_t size, size_t alignment);
};
#endif