[rvm-research] Gen.virtualMemoryExhausted() does not work properly for GenCopy
Lingyu Zhu <[email protected]> Thu, 29 Mar 2018 14:29:34 +0800
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <CACFGcbYfcXe-V3WtQkBQ_FaHSGbotwn-2jE=UoxiuTVL0JmjPQ@mail.gmail.com> |
Gen.colletionRequired() uses method virtualMemoryExhausted() as one condition to trigger GC. This means GenCopy checks if (nursery + toSpace) * COPY_EXPANSION larger than half available pages of toSpace, which in turn leads to prematurely triggering minor GC. Instead, I think the correct condition is nursery * COPY_EXPANSION larger than available pages of toSpace. On the other hand, Gen.requiresFullHeapcollection() use virtualMemoryExhausted() as one condition to determine whether triggering full gc. It compares collection reserved pages with *toSpace* available pages. However, till virtualMemoryExhausted() is called, the Mature has not flipped. So It should compare reserved pages with *fromSpace* available pages. Also, I can't figure out why HALF of available mature space rather than whole available mature space is checked. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jikesrvm-researchers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers