[ruby-core:92451] [Ruby trunk Misc#15805] Let memory sizes of the various IMEMO object types be reflected correctly

From: lourens@...
Date: 2019-04-27 23:36:09 UTC
List: ruby-core #92451
Issue #15805 has been reported by methodmissing (Lourens Naud=E9).

----------------------------------------
Misc #15805: Let memory sizes of the various IMEMO object types be reflecte=
d correctly
https://bugs.ruby-lang.org/issues/15805

* Author: methodmissing (Lourens Naud=E9)
* Status: Open
* Priority: Normal
* Assignee: =

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

In current trunk only the `imemo_tmpbuf` type's auxiliary malloc heap buffe=
r is factored into `obj_memsize_of`. The following IMEMO types also allocat=
e on the malloc heap:

* `imemo_env` (similar pattern as `imemo_tmpbuf`, an array of `VALUE`s)
* `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 to=
o)

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?



-- =

https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=3Dunsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next