diff options
| author | steven-na <noreply.github@stvnc.dev> | 2026-08-10 13:20:30 -0700 |
|---|---|---|
| committer | steven-na <noreply.github@stvnc.dev> | 2026-08-10 13:20:30 -0700 |
| commit | cd11935a0e50b0098c96c5eea8dc20420b31360e (patch) | |
| tree | f7f457ceb8cba43447e5c1aeea857348ce984a52 /src | |
| parent | 5d575f8cd99e9bc064b3d998f17b194a818e3546 (diff) | |
Moved to unity build, hopefully
Diffstat (limited to 'src')
| -rw-r--r-- | src/smrt_arena.c | 5 | ||||
| -rw-r--r-- | src/unity.c | 29 |
2 files changed, 32 insertions, 2 deletions
diff --git a/src/smrt_arena.c b/src/smrt_arena.c index 3618771..cf6418e 100644 --- a/src/smrt_arena.c +++ b/src/smrt_arena.c @@ -1,5 +1,7 @@ #if defined(__linux__) -#define _DEFAULT_SOURCE + #ifndef _DEFAULT_SOURCE + #define _DEFAULT_SOURCE + #endif /* ifndef _DEFAULT_SOURCE */ #endif #include "common.h" @@ -7,7 +9,6 @@ #include <string.h> - static __thread smrt_arena_t *_scratch_pool[SCRATCH_POOL_SIZE] = { 0 }; smrt_arena_t *smrt_arena_create(u64 reserve_size, u64 commit_size, b32 auto_decommit) { diff --git a/src/unity.c b/src/unity.c new file mode 100644 index 0000000..61d5b02 --- /dev/null +++ b/src/unity.c @@ -0,0 +1,29 @@ +#ifndef _GNU_SOURCE + #define _GNU_SOURCE +#endif /* ifndef _GNU_SOURCE */ +#ifndef _DEFAULT_SOURCE + #define _DEFAULT_SOURCE +#endif /* ifndef _DEFAULT_SOURCE */ + +// Config for global scratch arena allocations +#if 0 + #define SCRATCH_POOL_SIZE 2 + #define SMRTA_SCRATCH_RESERVE_SIZE MiB(64) +#endif /* if 0 */ + +// Arenas and mem management +#include "ez_arena.c" +#include "smrt_arena.c" + +// Data structures +#include "string.c" +#include "vec2.c" +#include "slidingwindow.c" +#include "vec2sw.c" + +// DSP/Audio +#include "wav.c" +#include "dft.c" + +// Misc +#include "version.c" |