Gareth Rees
100405cac2
Restore the chunk ring.
...
Copied from Perforce
Change: 186558
ServerID: perforce.ravenbrook.com
2014-06-13 12:31:47 +01:00
Gareth Rees
8c9de5f775
New function arenachunktreetraverse ensures that calls to chunkofaddr are reliably detected.
...
Copied from Perforce
Change: 186550
ServerID: perforce.ravenbrook.com
2014-06-12 20:28:50 +01:00
Gareth Rees
de2a30d207
Catch-up merge from master sources @186481 to branch/2014-05-17/chunk-tree.
...
Copied from Perforce
Change: 186491
ServerID: perforce.ravenbrook.com
2014-06-11 13:52:31 +01:00
Gareth Rees
2087688964
Fix problems identified by rb in review < https://info.ravenbrook.com/mail/2014/06/05/14-58-24/0/ >.
...
Copied from Perforce
Change: 186451
ServerID: perforce.ravenbrook.com
2014-06-08 22:10:21 +01:00
Gareth Rees
220e23a758
Fix problems identified by dl in review < https://info.ravenbrook.com/mail/2014/06/05/14-49-13/0/ >.
...
Copied from Perforce
Change: 186445
ServerID: perforce.ravenbrook.com
2014-06-08 17:45:44 +01:00
Gareth Rees
58f35172c7
Tree_traverse_and_delete is a better name than tree_destroy.
...
Generalize this macro so it can be used in all three cases.
Copied from Perforce
Change: 186228
ServerID: perforce.ravenbrook.com
2014-05-21 11:38:59 +01:00
Gareth Rees
a0e076be57
Improvements following review.
...
Copied from Perforce
Change: 186227
ServerID: perforce.ravenbrook.com
2014-05-21 00:43:06 +01:00
Gareth Rees
dbfe3ca425
Fix compilation on windows.
...
Fix bug in ArenaDescribeTracts (only described the first tract).
Copied from Perforce
Change: 186215
ServerID: perforce.ravenbrook.com
2014-05-20 19:19:14 +01:00
Gareth Rees
2f0ef9355d
Clarify tracefix logic by unwinding the nested conditions.
...
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
2014-05-20 18:12:37 +01:00
Gareth Rees
0b0a465674
Replace the chunk ring with a chunk tree.
...
Fix bug in SplayFindNext (LESS and GREATER the wrong way round).
Copied from Perforce
Change: 186157
ServerID: perforce.ravenbrook.com
2014-05-17 17:05:42 +01:00
Gareth Rees
b90f8b9bcd
Use cbs subclasses to implement the fast-find and find-in-zones features. this avoids the need to control behaviour by passing booleans, and it means that there is no wasted space in the cbs block structure when these features are not used.
...
Bring splay tree design up to date; add missing diagrams; move it to the "current" section of the manual.
Copied from Perforce
Change: 185294
ServerID: perforce.ravenbrook.com
2014-04-07 15:36:18 +01:00
Richard Brooksby
9d7b1ff29e
Improving comments in response to code review suggestions < https://info.ravenbrook.com/mail/2014/03/11/14-47-33/0/ >.
...
Copied from Perforce
Change: 184725
ServerID: perforce.ravenbrook.com
2014-03-11 15:46:51 +00:00
Richard Brooksby
16e0798806
Responding to code review < https://info.ravenbrook.com/mail/2014/03/07/22-40-36/0/ >.
...
Using TREE_ELT where appropriate.
Using AVERT consistently on Tree, but see job003691.
Copied from Perforce
Change: 184724
ServerID: perforce.ravenbrook.com
2014-03-11 15:46:51 +00:00
Richard Brooksby
65a00f5945
Minor documentation improvements to binary trees.
...
Copied from Perforce
Change: 184552
ServerID: perforce.ravenbrook.com
2014-02-26 13:23:31 +00:00
Richard Brooksby
f47100fd09
Permitting tree traversals to abort early.
...
Copied from Perforce
Change: 184511
ServerID: perforce.ravenbrook.com
2014-02-23 15:36:27 +00:00
Richard Brooksby
a52bb1d3ea
Implementing pointer-reversing tree traversal that does not disturb the tree shape, unlike the splay tree traversal, which flattens the tree into a list. replacing cbsiterate with this, knocking about 25% off the runtime of the test case: xc/release/djbench -x 1234 --sshift 8 mvff
...
Copied from Perforce
Change: 184444
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
17b72c3052
Adding tree integrity check debugging function.
...
Copied from Perforce
Change: 184441
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
fee5ac310e
Eliminating redundant passing of tree keys by adding a method to extract the key from a tree node.
...
Copied from Perforce
Change: 184440
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
93a0ffe8ee
Generalising pointer reversal of tree spines.
...
Copied from Perforce
Change: 184437
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
6bc35c5ca0
Generalising splayrotate operations into treerotates.
...
Copied from Perforce
Change: 184431
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
85b11f7b55
Replacing splaynodestruct with treestruct and basic tree navigation operations in the splay tree implementation.
...
Copied from Perforce
Change: 184425
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
96473a433e
Adding basic generic binary tree datatype.
...
Copied from Perforce
Change: 184423
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:07 +00:00