Base/platform/src-c/alloc/shortcuts.c

31 lines
580 B
C

#include <librr/alloc/generic.h>
void * rr_alloc(rr_generic_allocator_s *allocator, usz_t size)
{
return allocator->fn_alloc(allocator, size);
}
void rr_free(rr_generic_allocator_s *allocator, void *allocation)
{
return allocator->fn_free(allocator, allocation);
}
void * rr_arena_alloc(rr_generic_arena_s *arena, usz_t size)
{
return arena->fn_alloc(arena, size);
}
void * rr_pool_alloc(rr_generic_pool_s *pool)
{
return pool->fn_alloc(pool);
}
void rr_pool_free(rr_generic_pool_s *pool, void *allocation)
{
return pool->fn_free(pool, allocation);
}