summaryrefslogtreecommitdiff
path: root/source/base/base_mem.h
diff options
context:
space:
mode:
authornasr <nsrddyn@gmail.com>2026-04-19 18:38:22 +0200
committernasr <nsrddyn@gmail.com>2026-04-19 18:38:22 +0200
commit36dc1f859a13e428c441fc8f4f35550fe12ed72f (patch)
treee8a98a43ccbd8b989427dc529dbdf37b2f942f9a /source/base/base_mem.h
parent078e21a1feb811f9ef7797ce3ee5d2e8ffcccfce (diff)
feature(base): refactored the base library. removed some files etc and did stuff
Diffstat (limited to 'source/base/base_mem.h')
-rw-r--r--source/base/base_mem.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/source/base/base_mem.h b/source/base/base_mem.h
deleted file mode 100644
index 2778fce..0000000
--- a/source/base/base_mem.h
+++ /dev/null
@@ -1,26 +0,0 @@
1#ifndef BASE_MEM_H
2#define BASE_MEM_H
3
4#define ARENA_ALIGN (2 * sizeof(void *))
5#define MIN(a, b) (((a) < (b)) ? (a) : (b))
6#define MAX(a, b) (((a) > (b)) ? (a) : (b))
7
8internal inline b8
9is_pow(umm x)
10{
11 return (x & (x - 1)) == 0;
12}
13
14internal inline u64
15align(u64 pointer, umm alignment)
16{
17 if ((alignment & (alignment - 1)) == 0)
18 {
19 return pointer;
20 }
21
22 return (pointer + alignment - 1) & ~(alignment - 1);
23}
24
25
26#endif