3 ms·
What happens with objects that can't fit on a single page, such as a large array?
by jganetsk 16y ago
What happens with objects that can't fit on a single page, such as a large array?
- bensummers 16y agoThe obvious answer is to use more than one page. Why wouldn't that work with a special case for "large allocations", like most heap implementations?
- jganetsk 16y agoGood idea. Now that I think about it, a large object is trivial in this sysyem. You dedicate some group of contiguous pages solely to the object. This results in some potential waste of the last page, which is probably acceptable. You would not ever need to perform compaction in those pages, just pointer remapping. When the object eventually dies, you release all the pages at once.