* heap.cc (heap_init): Allocate heap from top down as a hedge against
subsequent ERROR_INVALID_ADDRESS in forked processes when CTRL-C is pressed.
This commit is contained in:
		| @@ -1,3 +1,9 @@ | |||||||
|  | 2005-09-11  Christopher Faylor  <cgf@timesys.com> | ||||||
|  |  | ||||||
|  | 	* heap.cc (heap_init): Allocate heap from top down as a hedge against | ||||||
|  | 	subsequent ERROR_INVALID_ADDRESS in forked processes when CTRL-C is | ||||||
|  | 	pressed. | ||||||
|  |  | ||||||
| 2005-09-09  Christopher Faylor  <cgf@timesys.com> | 2005-09-09  Christopher Faylor  <cgf@timesys.com> | ||||||
|  |  | ||||||
| 	* heap.cc (heap_init): Be slightly more aggressive when trying to | 	* heap.cc (heap_init): Be slightly more aggressive when trying to | ||||||
|   | |||||||
| @@ -47,7 +47,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, PAGE_NOACCESS); | 	    VirtualAlloc (NULL, cygheap->user_heap.chunk, MEM_RESERVE | MEM_TOP_DOWN, 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; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user