From 078e21a1feb811f9ef7797ce3ee5d2e8ffcccfce Mon Sep 17 00:00:00 2001 From: nasr Date: Fri, 17 Apr 2026 17:49:10 +0200 Subject: feature(main): during my work on other projects I improved the base library a bit. this is a drag and drop of that in the project. the next steps exit out of implementing lineair regression and attempting to calcualte what the value would be of a key in the btree... Signed-off-by: nasr feature(main): during my work on other projects I improved the base library a bit. this is a drag and drop of that in the project. the next steps exit out of implementing lineair regression and attempting to calcualte what the value would be of a key in the btree... Signed-off-by: nasr --- source/base/base_arena.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/base/base_arena.h') diff --git a/source/base/base_arena.h b/source/base/base_arena.h index 2818ae4..dc6dd73 100755 --- a/source/base/base_arena.h +++ b/source/base/base_arena.h @@ -7,6 +7,11 @@ #define PushArray(arena, type, len) (type *)arena_alloc((arena), sizeof(type) * (len), 0) #define PushArrayZero(arena, type, len) (type *)arena_alloc((arena), sizeof(type) * (len), 1) +#define KiB(n) (((u64)(n)) << 10) +#define MiB(n) (((u64)(n)) << 20) +#define GiB(n) (((u64)(n)) << 30) + + typedef struct mem_arena mem_arena; struct mem_arena { -- cgit v1.3