From 1cc651ecafae07b9ed6edff9952e2b31f0503d0a Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 22 Oct 2002 16:18:55 +0000 Subject: * cygheap.cc (cygheap_fixup_in_child): Use user_heap element in cygheap. (init_cheap): Ditto for declaration. * fork.cc (fork_parent): Use user_heap element in cygheap. * heap.h (inheap): Ditto. * heap.cc (sbrk): Ditto. (heap_init): Ditto. Reorganize to shrink heap chunk as required and record new value in cygheap. * dcrt0.cc (dll_crt0_1): More "move the cygthread init" games. * shared.cc (open_shared): Rework memory protection to properly deal with relocated shared segment. (shared_info::heap_chunk_size): Rename element to 'heap_chunk'. * shared_info.h (shared_info): Ditto for declaration. * strace.cc (strace::hello): Report on heap chunk size from cygheap since it may shrink. --- winsup/cygwin/dcrt0.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/dcrt0.cc') diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index febb2004e..89c9a4456 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -585,11 +585,11 @@ dll_crt0_1 () { case _PROC_FORK: alloc_stack (fork_info); - cygthread::init (); cygheap_fixup_in_child (0); - close_ppid_handle = !!child_proc_info->pppid_handle; memory_init (); + cygthread::init (); set_myself (mypid); + close_ppid_handle = !!child_proc_info->pppid_handle; break; case _PROC_SPAWN: /* Have to delay closes until after cygheap is setup */ -- cgit v1.2.3