* heap.cc (heap_init): Revert 2005-09-11 patch as it seems to inexplicably
cause problems with emacs.
This commit is contained in:
parent
3aca3cb636
commit
1f48d233eb
@ -1,3 +1,8 @@
|
|||||||
|
2005-09-14 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* heap.cc (heap_init): Revert 2005-09-11 patch as it seems to
|
||||||
|
inexplicably cause problems with emacs.
|
||||||
|
|
||||||
2005-09-14 Christopher Faylor <cgf@timesys.com>
|
2005-09-14 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
Remove some more unneeded 'return;'s throughout.
|
Remove some more unneeded 'return;'s throughout.
|
||||||
|
@ -34,6 +34,7 @@ extern "C" size_t getpagesize ();
|
|||||||
void
|
void
|
||||||
heap_init ()
|
heap_init ()
|
||||||
{
|
{
|
||||||
|
const DWORD alloctype = MEM_RESERVE;
|
||||||
/* If we're the forkee, we must allocate the heap at exactly the same place
|
/* If we're the forkee, we must allocate the heap at exactly the same place
|
||||||
as our parent. If not, we don't care where it ends up. */
|
as our parent. If not, we don't care where it ends up. */
|
||||||
|
|
||||||
@ -47,7 +48,7 @@ heap_init ()
|
|||||||
* to assure contiguous memory. */
|
* to assure contiguous memory. */
|
||||||
cygheap->user_heap.ptr = cygheap->user_heap.top =
|
cygheap->user_heap.ptr = cygheap->user_heap.top =
|
||||||
cygheap->user_heap.base =
|
cygheap->user_heap.base =
|
||||||
VirtualAlloc (NULL, cygheap->user_heap.chunk, MEM_RESERVE | MEM_TOP_DOWN, PAGE_NOACCESS);
|
VirtualAlloc (NULL, cygheap->user_heap.chunk, alloctype, PAGE_NOACCESS);
|
||||||
if (cygheap->user_heap.base)
|
if (cygheap->user_heap.base)
|
||||||
break;
|
break;
|
||||||
cygheap->user_heap.chunk -= 1 * 1024 * 1024;
|
cygheap->user_heap.chunk -= 1 * 1024 * 1024;
|
||||||
@ -70,7 +71,7 @@ heap_init ()
|
|||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
p = (char *) VirtualAlloc (cygheap->user_heap.base, reserve_size,
|
p = (char *) VirtualAlloc (cygheap->user_heap.base, reserve_size,
|
||||||
MEM_RESERVE, PAGE_READWRITE);
|
alloctype, PAGE_READWRITE);
|
||||||
if (p)
|
if (p)
|
||||||
break;
|
break;
|
||||||
if ((reserve_size -= page_const) < allocsize)
|
if ((reserve_size -= page_const) < allocsize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user