summaryrefslogtreecommitdiff
path: root/typd_mlc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-09-16 12:27:22 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:46 +0200
commit048b93ba0fc96aa54293b5e82b3c973c3eb28144 (patch)
tree2cc77f674dfa9f5d918723cc7150cfaa047e9bec /typd_mlc.c
parent131fc4e5b373b60b2d2945c60a06e4d806e6c664 (diff)
2009-09-16 Ivan Maidanski <ivmai@mail.ru>
(ivmai128.diff - superseding diff62, diff66 partly) * finalize.c (GC_general_register_disappearing_link): Return GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2, respectively). * include/gc.h (GC_NO_MEMORY): New macro (defined as 2). * include/gc.h (GC_register_disappearing_link, GC_general_register_disappearing_link): Update the comment. * typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro. * finalize.c (GC_general_register_disappearing_link, GC_register_finalizer_inner): Recalculate the hash table index after GC_oom_fn succeeded (since the table may grow while not holding the lock) and check again that the entry is still not in the table (free the unused entry otherwise unless DBG_HDRS_ALL). * finalize.c (GC_register_finalizer_inner): Initialize "hhdr" local variable (to prevent a compiler warning). * finalize.c (GC_register_finalizer_inner): Don't modify the data pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed (due to out of memory).
Diffstat (limited to 'typd_mlc.c')
-rw-r--r--typd_mlc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/typd_mlc.c b/typd_mlc.c
index ded8b2d..048fd72 100644
--- a/typd_mlc.c
+++ b/typd_mlc.c
@@ -721,7 +721,7 @@ DCL_LOCK_STATE;
/* Make sure the descriptor is cleared once there is any danger */
/* it may have been collected. */
if (GC_general_register_disappearing_link((void * *)((word *)op+lw-1),
- op) == 2) {
+ op) == GC_NO_MEMORY) {
/* Couldn't register it due to lack of memory. Punt. */
/* This will probably fail too, but gives the recovery code */
/* a chance. */