From 34b6814743937f988670a0b43c0edd9a06f2d3f2 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 16 Oct 2005 15:22:27 +0000 Subject: [PATCH] Trinca gave me an insanely sized map, lots of surfaces and things. Stupid load times. They're MUCH quicker now. Hurrah! And yes, r_shadows 1 was a mistake when trying this map. ehe. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1496 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/zone.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/engine/common/zone.c b/engine/common/zone.c index 71ec88968..b5e55575b 100644 --- a/engine/common/zone.c +++ b/engine/common/zone.c @@ -1027,6 +1027,7 @@ void *Hunk_AllocName (int size, char *name) { #ifdef NOHIGH int roundup; + int roundupold; #endif hunk_t *h; @@ -1052,9 +1053,17 @@ void *Hunk_AllocName (int size, char *name) h = (hunk_t *)(hunk_base + hunk_low_used); #ifdef NOHIGH + + roundupold = hunk_low_used+sizeof(hunk_t); + roundupold += 1024*128; + roundupold &= ~(1024*128 - 1); + roundup = hunk_low_used+size+sizeof(hunk_t); - roundup += 1024*64; - roundup &= ~(1024*64 - 1); + roundup += 1024*128; + roundup &= ~(1024*128 - 1); + + + if (roundup != roundupold) if (!VirtualAlloc (hunk_base, roundup, MEM_COMMIT, PAGE_READWRITE)) { char *buf;