summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/shared.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-08-09 12:00:27 +0000
committerCorinna Vinschen <corinna@vinschen.de>2011-08-09 12:00:27 +0000
commitafe817741cc8e509c9c3b2fdfca7c2b7ac4c994a (patch)
treecba5a71faf4fbd9f2e05fea7168695dd4827579d /winsup/cygwin/shared.cc
parentc29da54058ab28475e1a8e31c67abb8e2168b44f (diff)
downloadcygnal-afe817741cc8e509c9c3b2fdfca7c2b7ac4c994a.tar.gz
cygnal-afe817741cc8e509c9c3b2fdfca7c2b7ac4c994a.tar.bz2
cygnal-afe817741cc8e509c9c3b2fdfca7c2b7ac4c994a.zip
* heap.cc (eval_initial_heap_size): New function fetching the heap
size from the LoaderFlags field in the PE/COFF header. (heap_init): Call eval_initial_heap_size rather than cygwin_shared->heap_chunk_size to fetch the initial heap size. * shared.cc (shared_info::heap_chunk_size): Remove. * shared_info.h (class shared_info): Drop heap_chunk member. (CURR_SHARED_MAGIC): Update.
Diffstat (limited to 'winsup/cygwin/shared.cc')
-rw-r--r--winsup/cygwin/shared.cc31
1 files changed, 0 insertions, 31 deletions
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
index b538af56f..b38beb971 100644
--- a/winsup/cygwin/shared.cc
+++ b/winsup/cygwin/shared.cc
@@ -444,34 +444,3 @@ memory_init (bool init_cygheap)
shared_info::create (); /* Initialize global shared memory */
user_info::create (false); /* Initialize per-user shared memory */
}
-
-unsigned
-shared_info::heap_chunk_size ()
-{
- if (!heap_chunk)
- {
- /* Fetch from registry, first user then local machine. */
- for (int i = 0; i < 2; i++)
- {
- reg_key reg (i, 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. */
-
- if ((heap_chunk = reg.get_dword (L"heap_chunk_in_mb", 0)))
- break;
- heap_chunk = 384; /* Default */
- }
-
- if (heap_chunk < 4)
- heap_chunk = 4 * 1024 * 1024;
- else
- heap_chunk <<= 20;
- if (!heap_chunk)
- heap_chunk = 384 * 1024 * 1024;
- }
-
- return heap_chunk;
-}