diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gc.c | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Sun Mar 16 08:05:06 2014 Eric Wong <e@80x24.org> + + * gc.c (objspace_xcalloc): fix GC accounting + Sun Mar 16 06:33:35 2014 NARUSE, Yui <naruse@ruby-lang.org> * addr2line.c (fill_lines): return address is just after calling @@ -6231,6 +6231,8 @@ objspace_xcalloc(rb_objspace_t *objspace, size_t count, size_t elsize) size = objspace_malloc_prepare(objspace, size); TRY_WITH_GC(mem = calloc(1, size)); + size = objspace_malloc_size(objspace, mem, size); + objspace_malloc_increase(objspace, mem, size, 0, MEMOP_TYPE_MALLOC); return objspace_malloc_fixup(objspace, mem, size); } |