]> granicus.if.org Git - gc/commitdiff
Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations
authorReimer Behrends <behrends@gmail.com>
Sat, 8 Dec 2012 06:33:06 +0000 (10:33 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 8 Dec 2012 06:33:06 +0000 (10:33 +0400)
* 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.

typd_mlc.c

index e1d3b2ab7098eb8ab219fb056355c39b0c96dfd3..ef191e525bbb6842d06e879c6647e32b2b8a5f3d 100644 (file)
@@ -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;
        }
    }