From baf418d216537d5c095d84a498053589ff02e4e5 Mon Sep 17 00:00:00 2001 From: WormHeamer Date: Tue, 4 Mar 2025 22:24:42 -0500 Subject: put ZONE_BACKEND ifdef up out of implementation --- zone.h | 15 +++++++-------- 1 file 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 -- cgit 1.4.1-2-gfad0