mirror of
https://github.com/fredrikr79/SnakeDL3.git
synced 2025-12-24 19:20:21 +01:00
arena: move kb macro
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#define KB(x) x * 1024
|
||||
|
||||
typedef struct {
|
||||
char *buffer;
|
||||
size_t size;
|
||||
|
||||
Reference in New Issue
Block a user