summaryrefslogtreecommitdiff
path: root/alloc.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2009-11-03 22:06:30 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:51 +0400
commit51a2fb7f1c099beefa506fa838615d874fe9455d (patch)
tree7df5d0d8923a41bc6c7b5d631aa01661f5d74a33 /alloc.c
parent1a99b16bf0e3733b4803ca4530e5b6ddfa4d64d3 (diff)
downloadbdwgc-51a2fb7f1c099beefa506fa838615d874fe9455d.tar.gz
2009-11-03 Hans Boehm <Hans.Boehm@hp.com>
* alloc.c: Revert last change.
Diffstat (limited to 'alloc.c')
-rw-r--r--alloc.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/alloc.c b/alloc.c
index 56d565a9..3efbde7f 100644
--- a/alloc.c
+++ b/alloc.c
@@ -190,9 +190,13 @@ GC_API GC_stop_func GC_CALL GC_get_stop_func(void)
/* collections to amortize the collection cost. */
static word min_bytes_allocd(void)
{
- int dummy;
- signed_word stack_size = (ptr_t)(&dummy) - GC_stackbottom;
-
+# ifdef THREADS
+ /* We punt, for now. */
+ signed_word stack_size = 10000;
+# else
+ int dummy;
+ signed_word stack_size = (ptr_t)(&dummy) - GC_stackbottom;
+# endif
word total_root_size; /* includes double stack size, */
/* since the stack is expensive */
/* to scan. */
@@ -200,14 +204,6 @@ static word min_bytes_allocd(void)
/* during normal GC. */
if (stack_size < 0) stack_size = -stack_size;
-
-# ifdef THREADS
- if (GC_need_to_lock) {
- /* We are multi-threaded. */
- if (stack_size < 10000) stack_size = 10000; /* We punt, for now. */
- }
-# endif
-
total_root_size = 2 * stack_size + GC_root_size;
scan_size = 2 * GC_composite_in_use + GC_atomic_in_use/4
+ total_root_size;