Fumofumotris/rewrite/c/allocator.c
2024-05-24 00:36:13 -05:00

10 lines
182 B
C

#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;
}