Arenas carry NMT flags. Logically, an arena should never change that flag, however it is non-const. That is because Arenas (as ResourceAreas), used by CompilerThread, are accounted toward mtCompiler. But since the RA is already created in the parent class constructor, we then have to awkwardly change the flag of an already existing RA in the CompilerThread constructor.
It would matters easier for NMT, and enable future simplifications, if Arena MEMFLAGS were never to change during the lifetime of Arena.
It would matters easier for NMT, and enable future simplifications, if Arena MEMFLAGS were never to change during the lifetime of Arena.