From: Reimer Behrends Date: Sat, 8 Dec 2012 06:33:06 +0000 (+0400) Subject: Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations X-Git-Tag: gc7_4_0~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13a88c0704d6f83ff97be0a246692e0e2da292f5;p=gc Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations * typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page): Use BYTES_TO_GRANULES instead of BYTES_TO_WORDS when calculating "lg" local variable value. --- diff --git a/typd_mlc.c b/typd_mlc.c index e1d3b2ab..ef191e52 100644 --- a/typd_mlc.c +++ b/typd_mlc.c @@ -647,7 +647,7 @@ GC_API void * GC_CALL GC_malloc_explicitly_typed_ignore_off_page(size_t lb, } else { op = (ptr_t)GENERAL_MALLOC_IOP(lb, GC_explicit_kind); if (op != NULL) { - lg = BYTES_TO_WORDS(GC_size(op)); + lg = BYTES_TO_GRANULES(GC_size(op)); ((word *)op)[GRANULES_TO_WORDS(lg) - 1] = d; } }