Commit 0d05360d authored by Richard M. Stallman's avatar Richard M. Stallman

(allocate_heap): Clean up conditional.

parent 4c145b9e
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment