* child_info.h (CURR_CHILD_INFO_MAGIC): Reset to new value.

(child_info::cygheap_alloc_sz): New field.
* cygheap.cc (init_cheap): Reduce size of cygwin stack until minimal hit when
attempting initial allocation.
(cygheap_setup_for_child): Use alloc_sz to create secondary memory mapped
entry.  Store alloc_sz in cygheap_alloc_sz.
(cygheap_fixup_in_child): Use cygheap_alloc_sz to map parent's cygheap.
* cygheap.h (_CYGHEAPSIZE_SLOP): New define.
(CYGHEAPSIZE): Use _CYGHEAPSIZE_SLOP.
This commit is contained in:
Christopher Faylor
2004-03-18 19:30:51 +00:00
parent 891d1990ab
commit d8f87fba65
4 changed files with 33 additions and 9 deletions

View File

@ -272,7 +272,9 @@ struct init_cygheap
void close_ctty ();
};
#define CYGHEAPSIZE (sizeof (init_cygheap) + (20000 * sizeof (fhandler_union)) + (32 * 1024 * 1024))
#define _CYGHEAPSIZE_SLOP (32 * 1024 * 1024)
#define CYGHEAPSIZE (sizeof (init_cygheap) + (20000 * sizeof (fhandler_union)) + _CYGHEAPSIZE_SLOP)
#define CYGHEAPSIZE_MIN (sizeof (init_cygheap) + (10000 * sizeof (fhandler_union)))
extern init_cygheap *cygheap;
extern void *cygheap_max;