MPS issue job003815

TitleFreeing a page never destroys a chunk
Statusopen
Priorityoptional
Assigned userGareth Rees
OrganizationRavenbrook
DescriptionFreeing memory to the arena via ArenaFree clears the pages from the chunk's allocTable, possibly leaving the chunk empty. But the chunk is never destroyed at this point.
AnalysisChunks are only destroyed from VMCompact, which is called from ArenaCompact in every traceReclaim. This has the following bad consequences:

(i) If you only use manual memory management, chunks are never destroyed.
(ii) VMCompact doesn't take into account hysteresis
(iii) If we ever redesign TraceQuantum so that it skips traceReclaim if there's nothing to do, then chunks will only be destroyed if there is garbage collection (that means that a program that only uses manual pools will never destroy chunks).

Need to consider destroying chunks in arenaUnmapSpare.

See also job003999.
How foundinspection
EvidenceNone
Created byGareth Rees
Created on2014-05-20 15:34:06
Last modified byGareth Rees
Last modified on2016-10-14 21:27:29
History2014-05-20 GDR Created.