Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-09-09 23:06:50 +0400
committerChristopher Faylor <me@cgf.cx>2001-09-09 23:06:50 +0400
commitde05a524ca9636914d8c228551f27feb6b509c4d (patch)
tree11680bdf0bf8920df92b999dd462206e5b8d5d36 /winsup/cygwin/shared.cc
parentc38677586752178f00e7ad467c8daae2121d10c8 (diff)
* cygheap.cc (cygheap_fixup_in_child): Clear cygheap->base so that heap is not
forced to start at the same place in execed process. * heap.cc: Remove brk* macros for clarity throughout. * heap.h: Ditto. * shared.cc (shared_info::initialize): Move heap_chunk test into heap_chunk_size(). (heap_chunk_size): Check for chunk size here. Don't go to registry if heap_chunk_in_mb is already set. * smallprint.c (console_printf): Add Windows 95 concessions.
Diffstat (limited to 'winsup/cygwin/shared.cc')
-rw-r--r--winsup/cygwin/shared.cc38
1 files changed, 19 insertions, 19 deletions
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
index 2fe5b85a9..1a267ea4c 100644
--- a/winsup/cygwin/shared.cc
+++ b/winsup/cygwin/shared.cc
@@ -103,8 +103,6 @@ open_shared (const char *name, HANDLE &shared_h, DWORD size, void *addr)
void
shared_info::initialize ()
{
- /* Ya, Win32 provides a way for a dll to watch when it's first loaded.
- We may eventually want to use it but for now we have this. */
if (inited)
{
if (inited != SHAREDVER)
@@ -120,23 +118,6 @@ shared_info::initialize ()
/* Initialize tty table. */
tty.init ();
-
- /* Fetch misc. registry entries. */
-
- reg_key reg (KEY_READ, NULL);
-
- /* Note that reserving a huge amount of heap space does not result in
- the use of swap since we are not committing it. */
- /* FIXME: We should not be restricted to a fixed size heap no matter
- what the fixed size is. */
-
- heap_chunk_in_mb = reg.get_int ("heap_chunk_in_mb", 256);
- if (heap_chunk_in_mb < 4)
- {
- heap_chunk_in_mb = 4;
- reg.set_int ("heap_chunk_in_mb", heap_chunk_in_mb);
- }
-
inited = SHAREDVER;
}
@@ -198,6 +179,25 @@ shared_terminate ()
unsigned
shared_info::heap_chunk_size ()
{
+ if (!heap_chunk_in_mb)
+ {
+ /* Fetch misc. registry entries. */
+
+ reg_key reg (KEY_READ, NULL);
+
+ /* Note that reserving a huge amount of heap space does not result in
+ the use of swap since we are not committing it. */
+ /* FIXME: We should not be restricted to a fixed size heap no matter
+ what the fixed size is. */
+
+ heap_chunk_in_mb = reg.get_int ("heap_chunk_in_mb", 256);
+ if (heap_chunk_in_mb < 4)
+ {
+ heap_chunk_in_mb = 4;
+ reg.set_int ("heap_chunk_in_mb", heap_chunk_in_mb);
+ }
+ }
+
return heap_chunk_in_mb << 20;
}