equal
deleted
inserted
replaced
118 // returns the possibly replaced TreeList* for the node in |
118 // returns the possibly replaced TreeList* for the node in |
119 // the tree. It also updates the parent of the original |
119 // the tree. It also updates the parent of the original |
120 // node to point to the new node. |
120 // node to point to the new node. |
121 TreeList<Chunk_t, FreeList_t>* remove_chunk_replace_if_needed(TreeChunk<Chunk_t, FreeList_t>* tc); |
121 TreeList<Chunk_t, FreeList_t>* remove_chunk_replace_if_needed(TreeChunk<Chunk_t, FreeList_t>* tc); |
122 // See FreeList. |
122 // See FreeList. |
123 void return_chunk_at_head(TreeChunk<Chunk_t, FreeList_t>* tc); |
|
124 void return_chunk_at_tail(TreeChunk<Chunk_t, FreeList_t>* tc); |
123 void return_chunk_at_tail(TreeChunk<Chunk_t, FreeList_t>* tc); |
125 }; |
124 }; |
126 |
125 |
127 // A TreeChunk is a subclass of a Chunk that additionally |
126 // A TreeChunk is a subclass of a Chunk that additionally |
128 // maintains a pointer to the free list on which it is currently |
127 // maintains a pointer to the free list on which it is currently |
234 // at "tl". |
233 // at "tl". |
235 size_t total_free_blocks_in_tree(TreeList<Chunk_t, FreeList_t>* tl) const; |
234 size_t total_free_blocks_in_tree(TreeList<Chunk_t, FreeList_t>* tl) const; |
236 size_t num_free_blocks() const; |
235 size_t num_free_blocks() const; |
237 size_t tree_height() const; |
236 size_t tree_height() const; |
238 size_t tree_height_helper(TreeList<Chunk_t, FreeList_t>* tl) const; |
237 size_t tree_height_helper(TreeList<Chunk_t, FreeList_t>* tl) const; |
239 size_t total_nodes_in_tree(TreeList<Chunk_t, FreeList_t>* tl) const; |
|
240 size_t total_nodes_helper(TreeList<Chunk_t, FreeList_t>* tl) const; |
238 size_t total_nodes_helper(TreeList<Chunk_t, FreeList_t>* tl) const; |
241 |
239 |
242 public: |
240 public: |
243 // Constructor |
241 // Constructor |
244 BinaryTreeDictionary() : |
242 BinaryTreeDictionary() : |