summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimer Behrends <behrends@gmail.com>2012-12-08 10:33:06 +0400
committerIvan Maidanski <ivmai@mail.ru>2012-12-08 10:33:06 +0400
commit13a88c0704d6f83ff97be0a246692e0e2da292f5 (patch)
treec140c5a146d0759f7e9e7d8061f89e6b76f8230f
parent9178e2b8f10eab0ac54c504c85022d0ea8ded36b (diff)
downloadbdwgc-13a88c0704d6f83ff97be0a246692e0e2da292f5.tar.gz
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.
-rw-r--r--typd_mlc.c2
1 files changed, 1 insertions, 1 deletions
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;
}
}