diff options
author | Christopher Faylor <me@cgf.cx> | 2001-07-21 03:20:01 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-07-21 03:20:01 +0000 |
commit | a7670c1e828fd3f628aee3c6d77b9c40bf429b0c (patch) | |
tree | e25595b7055f68babbec00191ff0c6804c1ffa94 /winsup/cygwin/cygheap.cc | |
parent | b34f1c9f7b31a65b9e7ef5cd049f8b2403787553 (diff) | |
download | newlib-a7670c1e828fd3f628aee3c6d77b9c40bf429b0c.zip newlib-a7670c1e828fd3f628aee3c6d77b9c40bf429b0c.tar.gz newlib-a7670c1e828fd3f628aee3c6d77b9c40bf429b0c.tar.bz2 |
* cygheap.cc (cygheap_fixup_in_child): Attempt Win95 workaround.
* dtable.cc (dtable::dup_worker): Add debugging output.
(dtable::vfork_child_dup): Correctly set close_on_exec.
* fhandler.cc (fhandler_base::fork_fixup): Don't mess with handle if there is
no need to get it from the parent.
* fhandler_tty.cc (fhandler_tty_common::close): Add debugging output.
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r-- | winsup/cygwin/cygheap.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 9d1eeeb..3ca185a 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -74,7 +74,7 @@ cygheap_setup_for_child (child_info *ci) newcygheap = MapViewOfFileEx (ci->cygheap_h, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0, NULL); if (!VirtualAlloc (newcygheap, n, MEM_COMMIT, PAGE_READWRITE)) - api_fatal ("couldn't allocate new heap for child, %E"); + api_fatal ("couldn't allocate new cygwin heap for child, %E"); memcpy (newcygheap, cygheap, n); UnmapViewOfFile (newcygheap); ci->cygheap = cygheap; @@ -96,9 +96,11 @@ cygheap_fixup_in_child (child_info *ci, bool execed) DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE)) cygheap_h = ci->cygheap_h; #endif + VirtualFree (cygheap, CYGHEAPSIZE, MEM_DECOMMIT); + VirtualFree (cygheap, 0, MEM_RELEASE); if (MapViewOfFileEx (ci->cygheap_h, FILE_MAP_READ | FILE_MAP_WRITE, - 0, 0, 0, cygheap) != cygheap) - api_fatal ("Couldn't allocate space for child's heap from %p, to %p, %E", + 0, 0, CYGHEAPSIZE, cygheap) != cygheap) + api_fatal ("Couldn't allocate space for child's cygwin heap from %p, to %p, %E", cygheap, cygheap_max); ForceCloseHandle1 (ci->cygheap_h, passed_cygheap_h); |