refactor(linting): moved page_size into function where it is used

This commit is contained in:
Mineplay 2025-10-05 10:27:54 -05:00
parent c642e75f1d
commit afcdff4c17

View file

@ -55,7 +55,6 @@ static _Thread_local size_t hallocy_small_memory_freed = 0;
static _Thread_local size_t hallocy_small_memory_allocated = 0; static _Thread_local size_t hallocy_small_memory_allocated = 0;
static _Thread_local HallocyMemoryHeader *hallocy_small_memory_bin = NULL; static _Thread_local HallocyMemoryHeader *hallocy_small_memory_bin = NULL;
static size_t page_size = 0;
static size_t hallocy_small_allocation_size = 0; static size_t hallocy_small_allocation_size = 0;
static size_t hallocy_medium_allocation_size = 0; static size_t hallocy_medium_allocation_size = 0;
@ -70,6 +69,7 @@ static BOOL CALLBACK hallocy_initialize_mutex(PINIT_ONCE init_once, PVOID parame
#endif #endif
void *hallocy_allocate(const size_t size, const bool zero_memory) { void *hallocy_allocate(const size_t size, const bool zero_memory) {
static size_t page_size = 0;
if (page_size == 0) { if (page_size == 0) {
#if defined(_WIN32) #if defined(_WIN32)
SYSTEM_INFO system_info; SYSTEM_INFO system_info;