Actions
Bug #17044
closedObjectSpace.dump allocates one string per anonymous class and module
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c)
Description
This is because it dump the module/class names using rb_class2name
which will create an ad hoc name for anonymous classes (e.g. "#<Class:0x00007fc8bdcda630>"
)
Since ObjectSpace.dump_all
is used to observe the heap, it should ideally not modify it.
The fix for it was merged by @nobu (Nobuyoshi Nakada) as 6a0cb1d649ecfc3e2af922c74ce82b3ff95fb12a and 347639ad8ad9fe2c6e88ff9b4faa21a11568bf6a, but I'd like to request it to be backported to at least 2.7
Updated by jeremyevans0 (Jeremy Evans) over 3 years ago
- Status changed from Open to Closed
- Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN to 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: REQUIRED
Actions
Like0
Like0