-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Right now, we place objects that need to be freed at shutdown into a weak list that is traversed at shutdown. This makes allocation slower and increases memory used.
Allocation:
Line 224 in 9903af4
| mmtk_add_obj_free_candidate(alloc_obj); |
Shutdown:
Lines 495 to 503 in 9903af4
| struct MMTk_RawVecOfObjRef registered_candidates = mmtk_get_all_obj_free_candidates(); | |
| for (size_t i = 0; i < registered_candidates.len; i++) { | |
| VALUE obj = (VALUE)registered_candidates.ptr[i]; | |
| if (rb_gc_shutdown_call_finalizer_p(obj)) { | |
| rb_gc_obj_free(objspace_ptr, obj); | |
| } | |
| } | |
| mmtk_free_raw_vec_of_obj_ref(registered_candidates); |
Instead, we should use heap walking at shutdown to free these objects.
Metadata
Metadata
Assignees
Labels
No labels