Title | Freeing a page never destroys a chunk |
Status | open |
Priority | optional |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | Freeing 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. |
Analysis | Chunks 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 found | inspection |
Evidence | None |
Created by | Gareth Rees |
Created on | 2014-05-20 15:34:06 |
Last modified by | Gareth Rees |
Last modified on | 2016-10-14 21:27:29 |
History | 2014-05-20 GDR Created. |