Fumofumotris/rewrite/c/allocator.c

10 lines
182 B
C
Raw Normal View History

2024-05-24 05:36:13 +00:00
#include "allocator.h"
#include <stdlib.h>
void *Alloc(struct Pool *pool, usize n, usize size)
{
void *ptr = (u8 *)pool->memory + pool->allocated;
pool->allocated += n * size;
}