diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-05 00:14:18 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-05 00:14:18 +0000 |
commit | d00b9cd2494d3f9e2f3b3966781884d85083d77f (patch) | |
tree | 88a556f74fb0052ef40f7b32c7dc19756675fe56 /boehm-gc/finalize.c | |
parent | 3b48d0d3244d28c93f25c6e0c640e30ff32c4c87 (diff) | |
download | gcc-d00b9cd2494d3f9e2f3b3966781884d85083d77f.tar.gz |
2001-04-04 Hans Boehm <hans_boehm@hp.com>
* finalize.c:
- Accomodate finalization requests for static objects.
(Will be required by hash synchronization. May be needed
in some configurations now.)
* gc_priv.h:
- Define MIN_WORDS. All allocation requests are rounded
up to at least this size. Removes a subtle assumption that
Java objects have a 2 word header.
* gcconfig.h:
- Adjust Linux/IA64 configuration for non-ancient kernels.
(Necessary fix for IA64.)
* linux_threads.c:
- Fix syntax error in currently unused code. Will be needed
for Linux/PA-RISC.
* malloc.c:
- Handle MIN_WORDS.
* misc.c:
- Handle MIN_WORDS.
- Change stack cleaning code to typically clear about one tenth
the memory it used to in the threads configuration. Occasionally
still clear more. (This is really a fix for a long-standing
and fairly significant performance bug with threads.)
* os_dep.c:
- Fix the code for finding the beginning of the data segment under
Linux. I believe this is necessary for some IA64 Linux
distributions. It will also helo other platforms, though those
may additionally require a gcconfig.h adjustment. (This basically
works around the absence of a data_start or __data_start
definition in glibc.)
* test.c:
- Handle rounding due to MIN_WORDS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41102 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/finalize.c')
-rw-r--r-- | boehm-gc/finalize.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/boehm-gc/finalize.c b/boehm-gc/finalize.c index e70a9ff1e99..7ff6798cfa5 100644 --- a/boehm-gc/finalize.c +++ b/boehm-gc/finalize.c @@ -324,6 +324,7 @@ finalization_mark_proc * mp; struct finalizable_object * curr_fo, * prev_fo; int index; struct finalizable_object *new_fo; + hdr *hhdr; DCL_LOCK_STATE; # ifdef THREADS @@ -402,6 +403,19 @@ finalization_mark_proc * mp; # endif return; } + GET_HDR(base, hhdr); + if (0 == hhdr) { + /* We won't collect it, hence finalizer wouldn't be run. */ + /* This is changed for gcj, but it will be in version 6.0 of the */ + /* standard collector distribution. It costs virtually nothing */ + /* here, but it's expensive to check in the hash synchronization */ + /* code, where it matters. -HB */ +# ifdef THREADS + UNLOCK(); + ENABLE_SIGNALS(); +# endif + return; + } # ifdef THREADS new_fo = (struct finalizable_object *) GC_generic_malloc_inner(sizeof(struct finalizable_object),NORMAL); @@ -413,7 +427,7 @@ finalization_mark_proc * mp; new_fo -> fo_hidden_base = (word)HIDE_POINTER(base); new_fo -> fo_fn = fn; new_fo -> fo_client_data = (ptr_t)cd; - new_fo -> fo_object_size = GC_size(base); + new_fo -> fo_object_size = hhdr -> hb_sz; new_fo -> fo_mark_proc = mp; fo_set_next(new_fo, fo_head[index]); GC_fo_entries++; |