summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWormHeamer2025-03-04 22:24:42 -0500
committerWormHeamer2025-03-04 22:24:42 -0500
commitbaf418d216537d5c095d84a498053589ff02e4e5 (patch)
tree2fb2c40a0d042f967ac5c69b34005b6b85fab3fe
parent4a91b9eb70e878bc1f5b52dcfe05c671a25c06e4 (diff)
put ZONE_BACKEND ifdef up out of implementation
-rw-r--r--zone.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/zone.h b/zone.h
index 1617feb..1d1dd4e 100644
--- a/zone.h
+++ b/zone.h
@@ -8,6 +8,13 @@
#define ZONE_MIN_CAPACITY 1024
#endif
+#ifndef ZONE_BACKEND
+ #ifdef __unix__
+ #define ZONE_BACKEND ZONE_USE_MMAP
+ #else
+ #define ZONE_BACKEND ZONE_USE_MALLOC
+ #endif
+#endif
#define ZONE_USE_MALLOC 0
#define ZONE_USE_MMAP 1
@@ -50,14 +57,6 @@ void *zn_zeroed(void *, size_t);
#include "zone.h"
-#ifndef ZONE_BACKEND
- #ifdef __unix__
- #define ZONE_BACKEND ZONE_USE_MMAP
- #else
- #define ZONE_BACKEND ZONE_USE_MALLOC
- #endif
-#endif
-
#ifndef ZONE_PAGE_MULT
#define ZONE_PAGE_MULT 2
#endif