From: Cloudwalk Date: Tue, 20 Jul 2021 18:03:39 +0000 (-0400) Subject: zone: Do a straight malloc on non-Windows X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d7c6a4d737c8f59bab92b37e0039882aa88a6dc8;p=xonotic%2Fdarkplaces.git zone: Do a straight malloc on non-Windows --- diff --git a/zone.c b/zone.c index b357a013..60598cd8 100644 --- a/zone.c +++ b/zone.c @@ -146,6 +146,9 @@ static void mmap_free(void *mem) // (Windows growing its swapfile for example) static void *attempt_malloc(size_t size) { +#ifndef WIN32 + return malloc(size); +#else void *base; // try for half a second or so unsigned int attempts = 500; @@ -157,6 +160,7 @@ static void *attempt_malloc(size_t size) Sys_Sleep(1000); } return NULL; +#endif } #endif