mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
gc.c (ruby_mimmalloc): add initialize code for USE_GC_MALLOC_OBJ_INFO_DETAILS
We often had SEGV in ruby_xfree when USE_GC_MALLOC_OBJ_INFO_DETAILS is 1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
06f54f0303
commit
a62a776d57
1 changed files with 7 additions and 0 deletions
7
gc.c
7
gc.c
|
@ -8247,6 +8247,13 @@ ruby_mimmalloc(size_t size)
|
|||
{
|
||||
struct malloc_obj_info *info = mem;
|
||||
info->size = 0;
|
||||
#if USE_GC_MALLOC_OBJ_INFO_DETAILS
|
||||
info->gen = 0;
|
||||
info->file = NULL;
|
||||
info->line = 0;
|
||||
#else
|
||||
info->file = NULL;
|
||||
#endif
|
||||
mem = info + 1;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue