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:
authorCorinna Vinschen <corinna@vinschen.de>2007-06-27 21:08:19 +0400
committerCorinna Vinschen <corinna@vinschen.de>2007-06-27 21:08:19 +0400
commit41391cb2bba626aeb1e6ab7f65eb87eec6f93f1a (patch)
treebd05f8d5212322b68cec9965c179af4287cb2ada /winsup/cygwin/shared.cc
parent048e00e01d23d1f8e59eb990ddc740b779f8f1f5 (diff)
* shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
(CURR_SHARED_MAGIC): Ditto. (class shared_info): Add heap_slop_inited member. * shared.cc (shared_info::heap_slop_size): Use heap_slop_inited to track initializing heap_slop since 0 is a valid value for heap_slop. Drop useless < 0 consideration.
Diffstat (limited to 'winsup/cygwin/shared.cc')
-rw-r--r--winsup/cygwin/shared.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
index 553caa2ba..fd9b87e5c 100644
--- a/winsup/cygwin/shared.cc
+++ b/winsup/cygwin/shared.cc
@@ -262,7 +262,7 @@ memory_init ()
unsigned
shared_info::heap_slop_size ()
{
- if (!heap_slop)
+ if (!heap_slop_inited)
{
/* Fetch from registry, first user then local machine. */
for (int i = 0; i < 2; i++)
@@ -273,11 +273,8 @@ shared_info::heap_slop_size ()
break;
heap_slop = wincap.heapslop ();
}
-
- if (heap_slop < 0)
- heap_slop = 0;
- else
- heap_slop <<= 20;
+ heap_slop <<= 20;
+ heap_slop_inited = true;
}
return heap_slop;