summaryrefslogtreecommitdiff
path: root/memory/memory.h
diff options
context:
space:
mode:
authortalha <talha@talhaamir.xyz>2024-03-13 23:31:17 +0500
committertalha <talha@talhaamir.xyz>2024-03-13 23:31:17 +0500
commit91a8f73a72c237065a4d4394f7372dc508c258d2 (patch)
treef2d4d75eeebf53545eccd89d745a32416460b4f1 /memory/memory.h
parent832bafccff577246dde2d11c23582f6a644c6c94 (diff)
Refactored memory files a bit
Diffstat (limited to 'memory/memory.h')
-rw-r--r--memory/memory.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/memory/memory.h b/memory/memory.h
index 94b5022..e402c0b 100644
--- a/memory/memory.h
+++ b/memory/memory.h
@@ -40,6 +40,8 @@ struct ResVoid {
};
b8 is_power_of_two(uintptr_t x);
+uintptr_t fast_modulo(uintptr_t p, uintptr_t a);
+uintptr_t align_forward(uintptr_t ptr, size_t align);
//===========================================================================================
// ---------------------------------- ARENA -------------------------------------------------
@@ -52,7 +54,6 @@ struct Arena {
size_t capacity;
};
-uintptr_t align_forward(uintptr_t ptr, size_t align);
void arena_init(struct Arena *a, unsigned char *backing_store, size_t capacity);
void* arena_alloc_aligned(struct Arena* a, size_t size, size_t align);
void* arena_alloc(struct Arena* a, size_t size);