summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-05-13 15:06:32 +0000
committerRichard M. Stallman <rms@gnu.org>1996-05-13 15:06:32 +0000
commit21ea157b3b7ece0fe70e57b35e041d100e6b1e11 (patch)
treed0462aa7acf08c0b8475dfa403eb04da184bda3e /src
parente9702a53b1d7462a6678c60446fb7aae763d6ae0 (diff)
downloademacs-21ea157b3b7ece0fe70e57b35e041d100e6b1e11.tar.gz
(allocate_heap): Clean up conditional.
Diffstat (limited to 'src')
-rw-r--r--src/w32heap.c12
1 files changed, 9 insertions, 3 deletions
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;
}