arena: move kb macro

This commit is contained in:
2025-03-31 01:17:47 +02:00
parent b76dce3d44
commit 60f1de2f64
2 changed files with 2 additions and 2 deletions

View File

@@ -4,8 +4,6 @@
#include <stdlib.h>
#include <string.h>
#define KB(x) x * 1024
void arena_init(Arena *a, size_t size) {
*a = (Arena){.buffer = malloc(size), .size = size, .offset = 0};
if (a->buffer == NULL)

View File

@@ -3,6 +3,8 @@
#include <stddef.h>
#define KB(x) x * 1024
typedef struct {
char *buffer;
size_t size;