changeset 15228:ae9888a75348

(allocate_heap): Clean up conditional.
author Richard M. Stallman <rms@gnu.org>
date Mon, 13 May 1996 15:06:32 +0000
parents 207c2c343394
children a270351f6e0c
files src/w32heap.c
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32heap.c	Mon May 13 01:31:28 1996 +0000
+++ b/src/w32heap.c	Mon May 13 15:06:32 1996 +0000
@@ -142,19 +142,25 @@
   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;
 }