aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-05-13 15:06:32 +0000
committerRichard M. Stallman1996-05-13 15:06:32 +0000
commit0d05360db7cc1bb79572f0c1ebd0461eb364257e (patch)
tree6ae5dd0b864e462d6fd97e0c21a328d58fca72b9 /src
parent4c145b9e93cbf404255aaf9bfda395e8bbeb175e (diff)
downloademacs-0d05360db7cc1bb79572f0c1ebd0461eb364257e.tar.gz
emacs-0d05360db7cc1bb79572f0c1ebd0461eb364257e.zip
(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)
142 unsigned long end = 1 << VALBITS; /* 256MB */ 142 unsigned long end = 1 << VALBITS; /* 256MB */
143 void *ptr = NULL; 143 void *ptr = NULL;
144 144
145#ifdef NTHEAP_PROBE_BASE 145#if NTHEAP_PROBE_BASE /* This is never normally defined */
146 /* Try various addresses looking for one the kernel will let us have. */
146 while (!ptr && (base < end)) 147 while (!ptr && (base < end))
147 { 148 {
148#endif
149 reserved_heap_size = end - base; 149 reserved_heap_size = end - base;
150 ptr = VirtualAlloc ((void *) base, 150 ptr = VirtualAlloc ((void *) base,
151 get_reserved_heap_size (), 151 get_reserved_heap_size (),
152 MEM_RESERVE, 152 MEM_RESERVE,
153 PAGE_NOACCESS); 153 PAGE_NOACCESS);
154#ifdef NTHEAP_PROBE_BASE
155 base += 0x00100000; /* 1MB increment */ 154 base += 0x00100000; /* 1MB increment */
156 } 155 }
156#else
157 reserved_heap_size = end - base;
158 ptr = VirtualAlloc ((void *) base,
159 get_reserved_heap_size (),
160 MEM_RESERVE,
161 PAGE_NOACCESS);
157#endif 162#endif
163
158 return ptr; 164 return ptr;
159} 165}
160 166