* Return value from TreeVisitor is Bool, not Res, so pass Res back via a closure.
* Can't use TRACT_TRACT_FOR while iterating over the chunk tree, because that macro uses ChunkOfAddr. (A plain loop is simpler.)
* Mustn't try to describe unallocated tracts -- they might not even be mapped into memory. So consult the allocTable.
Make tract functions more robust:
* TractCheck must only check the pool if there is one (otherwise it segfaults for unallocated tracts)
* TractLimit can't look up the arena via TractPool, because the tract might not have a pool. So pass in the arena as an argument.
Copied from Perforce
Change: 186547
ServerID: perforce.ravenbrook.com
Change the arena's chunk tree from a splay tree to an ordinary tree (so that it's not possible to accidentally splay it and leave it unbalanced).
New function TreeFindNext allows us to implement TractFirst and TractNext without having to splay the tree.
Make sure all operations on the chunk tree leave it balanced. But don't balance the tree directly in ChunkFinish() because this is only ever called in a loop where multiple chunks are being deleted from the tre. Instead use the sequence TreeToVine -- iterate and delete -- TreeBalance. The new macro TREE_DESTROY assists with this.
No need any more for ArenaIsReservedAddr, CHUNK_OF_ADDR, TRACT_OF_ADDR.
Update design documentation.
Copied from Perforce
Change: 186212
ServerID: perforce.ravenbrook.com
Balance the chunk tree after insertion and deletion.
Avoid calling TractFirst and TractNext in ArenaDescribeTracts and PoolOfRange.
Copied from Perforce
Change: 186199
ServerID: perforce.ravenbrook.com
Spare pages are returned to the OS using the ring in roughly LRU order.
Only enough spare pages are returned to maintain hysteresis, rather than all of them.
Nearly ready to strip out the noSparePages bit table.
Copied from Perforce
Change: 184245
ServerID: perforce.ravenbrook.com
Avoid if with empty body by adding NOOP.
Avoid extended offsetof in expansion of PageOfTract, linkOfMessage, linkOfRing, and Pool2AMST macros.
Copied from Perforce
Change: 183413
ServerID: perforce.ravenbrook.com
tract.c -- fix more ChunkCache defects:
- drop never-read chunkCache->pageTableBase and pageTableLimit fields: they were used for ChunkOfSeg(), back when each SegStruct was actually a PageStruct is some chunk's PageStructTable; see VMArenaChunkOfSeg() in //info.ravenbrook.com/project/mps/branch/2001-08-13/trunk/src/arenavm.chttps://github.com/Ravenbrook/mps/issues/46
- there's no need for arena to initialise the chunk cache; this allows en/decache functions to be local to tract.c (ie. declared static)
Copied from Perforce
Change: 170083
ServerID: perforce.ravenbrook.com
Making some new files consistent with changes from that branch.
Deleting some new Global Graphics confidential files.
Copied from Perforce
Change: 30256
ServerID: perforce.ravenbrook.com
This change will be integrated but ignored (-ay) to the gg-epcore/union sources, so that they retain HopeNames.
Copied from Perforce
Change: 24911
ServerID: perforce.ravenbrook.com
This was achieved by partially undoing changelist 24817, including an accidental corruption of eventgen.pl.
Copied from Perforce
Change: 24877
ServerID: perforce.ravenbrook.com