зеркало из https://github.com/github/ruby.git
If an object isn't embedded it will have an ivptr
We don't need to check the existence if an ivptr because non-embedded objects will always have one
This commit is contained in:
Родитель
9190451fcf
Коммит
2c19c1484a
5
gc.c
5
gc.c
|
@ -4077,9 +4077,8 @@ obj_memsize_of(VALUE obj, int use_all_types)
|
|||
|
||||
switch (BUILTIN_TYPE(obj)) {
|
||||
case T_OBJECT:
|
||||
if (!(RBASIC(obj)->flags & ROBJECT_EMBED) &&
|
||||
ROBJECT(obj)->as.heap.ivptr) {
|
||||
size += ROBJECT(obj)->as.heap.numiv * sizeof(VALUE);
|
||||
if (!(RBASIC(obj)->flags & ROBJECT_EMBED)) {
|
||||
size += ROBJECT_NUMIV(obj) * sizeof(VALUE);
|
||||
}
|
||||
break;
|
||||
case T_MODULE:
|
||||
|
|
Загрузка…
Ссылка в новой задаче