diff options
author | hboehm <hboehm> | 2009-11-03 22:06:30 +0000 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 21:06:51 +0400 |
commit | 51a2fb7f1c099beefa506fa838615d874fe9455d (patch) | |
tree | 7df5d0d8923a41bc6c7b5d631aa01661f5d74a33 /alloc.c | |
parent | 1a99b16bf0e3733b4803ca4530e5b6ddfa4d64d3 (diff) | |
download | bdwgc-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.c | 18 |
1 files changed, 7 insertions, 11 deletions
@@ -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; |