]> 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 08:51:37 +0000 (12:51 +0400)
commit2a3cef3fa4c428ffd25b72b5190cbd3d8e35caa0
treeb53d80fa080e5ff337ddbb9b0eb57f4b0693403b
parent7b0be4885117b95a169274fd922680eb20d43ce8
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