]> granicus.if.org Git - gc/commit
Fix GC_finalized_malloc failure on disclaim_test
authorPetter Urkedal <paurkedal@gmail.com>
Sun, 25 May 2014 13:57:03 +0000 (15:57 +0200)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 31 May 2014 10:08:28 +0000 (14:08 +0400)
commit33535060b4898c7883c3d98c4591bfc964541830
tree8410c80d7f82e47062416a9e79057dc38c857a28
parentc2c650fd897f7c7a9fdbe140dc5131d0fd26f332
Fix GC_finalized_malloc failure on disclaim_test
(revert part of commit 63fd11d)

The finalizer closure is placed in the first word in order to use the
lower bits to distinguish live objects from objects on the free list.
The downside of this is that we need one-word offset interior pointers,
and that GC_base does not return the start of the user region.

* fnlz_mlc.c (GC_finalized_disclaim): Move finalizer closure for
finalized object kinds back to the start of objects.
* fnlz_mlc.c (GC_init_finalized_malloc): Call
GC_register_displacement_inner() as GC_finalized_malloc returns
displaced pointer.
* fnlz_mlc.c (GC_core_finalized_malloc, GC_finalized_malloc): Store
fclos in first word of created object (instead of the last word);
return pointer to object displaced by 1 word.
fnlz_mlc.c