Add Image struct and initialise main arena
This commit is contained in:
parent
64ec6bfa59
commit
05fa3c70fa
28
src/main.c
28
src/main.c
@ -1,4 +1,26 @@
|
|||||||
typedef struct img Image;
|
#include "aliases.h"
|
||||||
struct img {};
|
#include "mem_arena.h"
|
||||||
|
#include "mem_utils.h"
|
||||||
|
#include "pam.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
int main(void) { return 0; }
|
typedef struct img Image;
|
||||||
|
struct img {
|
||||||
|
u64 width;
|
||||||
|
u64 height;
|
||||||
|
u8 *buf;
|
||||||
|
};
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
Arena *arena = NULL;
|
||||||
|
if (!wapp_mem_arena_init(&arena, 10ul * 1024ul * 1024ul * 1024ul,
|
||||||
|
WAPP_MEM_ALLOC_RESERVE, false)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
wapp_mem_arena_destroy(&arena);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user