You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current region allocator never release memory to the system. And for "good" reasons: it doesn't track which memory has been used and which hasn't.
Newly allocated pages need to be marked as clean, while pages that are returned to the RegionAllocator must be marked as dirty.
Each region needs to keep an accounting of the number of dirty pages the contain. Regions with a higher number of dirty pages should be preferentially used.
Dirty pages can be purged, using madvise's MADV_FREE to be converted back to free pages.
A queue of run of dirty pages must be maintained so that they can be purged starting by the oldest ones. The RegionAllocator API must be extended to request the purge of a certain number of pages.
The current region allocator never release memory to the system. And for "good" reasons: it doesn't track which memory has been used and which hasn't.
Newly allocated pages need to be marked as clean, while pages that are returned to the
RegionAllocator
must be marked as dirty.Each region needs to keep an accounting of the number of dirty pages the contain. Regions with a higher number of dirty pages should be preferentially used.
Dirty pages can be purged, using madvise's
MADV_FREE
to be converted back to free pages.A queue of run of dirty pages must be maintained so that they can be purged starting by the oldest ones. The RegionAllocator API must be extended to request the purge of a certain number of pages.
For reference, the code that registers a region:
sdc/sdlib/d/gc/region.d
Lines 134 to 156 in 6cfcf22
The text was updated successfully, but these errors were encountered: