Project

General

Profile

Feature #15805

Let memory sizes of the various IMEMO object types be reflected correctly

Added by methodmissing (Lourens Naudé) 6 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:92451]

Description

References Github PR https://github.com/ruby/ruby/pull/2140

In current trunk only the imemo_tmpbuf type's auxiliary malloc heap buffer is factored into obj_memsize_of. The following IMEMO types also allocate on the malloc heap:

  • imemo_env (similar pattern as imemo_tmpbuf, an array of VALUEs)
  • imemo_ment (single struct allocated)
  • imemo_iseq (massaged the iseq_memsize API a little)
  • imemo_ast (more difficult to get right, need to walk buffer elements too)

The imemo_memsize function introduced attempts to be the entry point for object size calculation of the IMEMO types.

I think these are important to reflect actual size for heap dumps etc. too. Thoughts?

Associated revisions

Revision 90c4bd2d
Added by methodmissing (Lourens Naudé) 3 months ago

Let memory sizes of the various IMEMO object types be reflected correctly

[Feature #15805]

Closes: https://github.com/ruby/ruby/pull/2140

History

#1

Updated by nobu (Nobuyoshi Nakada) 3 months ago

  • Tracker changed from Misc to Feature
#2

Updated by methodmissing (Lourens Naudé) 3 months ago

  • Status changed from Open to Closed

Applied in changeset git|90c4bd2d2bd10b19c2b09834396553742bc7e8a4.


Let memory sizes of the various IMEMO object types be reflected correctly

[Feature #15805]

Closes: https://github.com/ruby/ruby/pull/2140

Also available in: Atom PDF