зеркало из https://github.com/github/ruby.git
YJIT: Fix IseqPayload::pages memory bloat
HashSet::clear() doesn't deallocate the backing buffer and shrink the capacity. Replace with a 0-capcity set instead so we reclaim some memory each code GC.
This commit is contained in:
Родитель
817193104d
Коммит
03f1e6a2aa
|
@ -574,7 +574,7 @@ impl CodeBlock {
|
|||
});
|
||||
// Avoid accumulating freed pages for future code GC
|
||||
for_each_off_stack_iseq_payload(|iseq_payload: &mut IseqPayload| {
|
||||
iseq_payload.pages.clear();
|
||||
iseq_payload.pages = std::collections::HashSet::default();
|
||||
});
|
||||
// Outlined code generated by CodegenGlobals::init() should also be kept.
|
||||
for page in CodegenGlobals::get_ocb_pages() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче