10 lines
182 B
C
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;
|
|
} |