From: Richard M. Stallman Date: Mon, 13 May 1996 15:06:32 +0000 (+0000) Subject: (allocate_heap): Clean up conditional. X-Git-Tag: emacs-19.34~634 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0d05360db7cc1bb79572f0c1ebd0461eb364257e;p=emacs.git (allocate_heap): Clean up conditional. --- diff --git a/src/w32heap.c b/src/w32heap.c index 776f857f3a5..6847b9345c7 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -142,19 +142,25 @@ allocate_heap (void) unsigned long end = 1 << VALBITS; /* 256MB */ void *ptr = NULL; -#ifdef NTHEAP_PROBE_BASE +#if NTHEAP_PROBE_BASE /* This is never normally defined */ + /* Try various addresses looking for one the kernel will let us have. */ while (!ptr && (base < end)) { -#endif reserved_heap_size = end - base; ptr = VirtualAlloc ((void *) base, get_reserved_heap_size (), MEM_RESERVE, PAGE_NOACCESS); -#ifdef NTHEAP_PROBE_BASE base += 0x00100000; /* 1MB increment */ } +#else + reserved_heap_size = end - base; + ptr = VirtualAlloc ((void *) base, + get_reserved_heap_size (), + MEM_RESERVE, + PAGE_NOACCESS); #endif + return ptr; }