1.1 --- a/src/share/vm/memory/binaryTreeDictionary.cpp Thu Mar 29 19:46:24 2012 -0700 1.2 +++ b/src/share/vm/memory/binaryTreeDictionary.cpp Wed Apr 25 09:55:55 2012 -0700 1.3 @@ -44,7 +44,7 @@ 1.4 } 1.5 1.6 template <class Chunk> 1.7 -void TreeChunk<Chunk>::verifyTreeChunkList() const { 1.8 +void TreeChunk<Chunk>::verify_tree_chunk_list() const { 1.9 TreeChunk<Chunk>* nextTC = (TreeChunk<Chunk>*)next(); 1.10 if (prev() != NULL) { // interior list node shouldn'r have tree fields 1.11 guarantee(embedded_list()->parent() == NULL && embedded_list()->left() == NULL && 1.12 @@ -53,7 +53,7 @@ 1.13 if (nextTC != NULL) { 1.14 guarantee(as_TreeChunk(nextTC->prev()) == this, "broken chain"); 1.15 guarantee(nextTC->size() == size(), "wrong size"); 1.16 - nextTC->verifyTreeChunkList(); 1.17 + nextTC->verify_tree_chunk_list(); 1.18 } 1.19 } 1.20 1.21 @@ -73,9 +73,9 @@ 1.22 tl->link_tail(tc); 1.23 tl->set_count(1); 1.24 tl->init_statistics(true /* split_birth */); 1.25 - tl->setParent(NULL); 1.26 - tl->setLeft(NULL); 1.27 - tl->setRight(NULL); 1.28 + tl->set_parent(NULL); 1.29 + tl->set_left(NULL); 1.30 + tl->set_right(NULL); 1.31 return tl; 1.32 } 1.33 1.34 @@ -92,15 +92,15 @@ 1.35 SpaceMangler::is_mangled((HeapWord*) tc->next_addr())) || 1.36 (tc->size() == 0 && tc->prev() == NULL && tc->next() == NULL), 1.37 "Space should be clear or mangled"); 1.38 - tc->setSize(size); 1.39 - tc->linkPrev(NULL); 1.40 - tc->linkNext(NULL); 1.41 + tc->set_size(size); 1.42 + tc->link_prev(NULL); 1.43 + tc->link_next(NULL); 1.44 TreeList<Chunk>* tl = TreeList<Chunk>::as_TreeList(tc); 1.45 return tl; 1.46 } 1.47 1.48 template <class Chunk> 1.49 -TreeList<Chunk>* TreeList<Chunk>::removeChunkReplaceIfNeeded(TreeChunk<Chunk>* tc) { 1.50 +TreeList<Chunk>* TreeList<Chunk>::remove_chunk_replace_if_needed(TreeChunk<Chunk>* tc) { 1.51 1.52 TreeList<Chunk>* retTL = this; 1.53 Chunk* list = head(); 1.54 @@ -108,7 +108,7 @@ 1.55 assert(tc != NULL, "Chunk being removed is NULL"); 1.56 assert(parent() == NULL || this == parent()->left() || 1.57 this == parent()->right(), "list is inconsistent"); 1.58 - assert(tc->isFree(), "Header is not marked correctly"); 1.59 + assert(tc->is_free(), "Header is not marked correctly"); 1.60 assert(head() == NULL || head()->prev() == NULL, "list invariant"); 1.61 assert(tail() == NULL || tail()->next() == NULL, "list invariant"); 1.62 1.63 @@ -148,24 +148,24 @@ 1.64 // Fix the parent to point to the new TreeList<Chunk>. 1.65 if (retTL->parent() != NULL) { 1.66 if (this == retTL->parent()->left()) { 1.67 - retTL->parent()->setLeft(retTL); 1.68 + retTL->parent()->set_left(retTL); 1.69 } else { 1.70 assert(this == retTL->parent()->right(), "Parent is incorrect"); 1.71 - retTL->parent()->setRight(retTL); 1.72 + retTL->parent()->set_right(retTL); 1.73 } 1.74 } 1.75 // Fix the children's parent pointers to point to the 1.76 // new list. 1.77 assert(right() == retTL->right(), "Should have been copied"); 1.78 if (retTL->right() != NULL) { 1.79 - retTL->right()->setParent(retTL); 1.80 + retTL->right()->set_parent(retTL); 1.81 } 1.82 assert(left() == retTL->left(), "Should have been copied"); 1.83 if (retTL->left() != NULL) { 1.84 - retTL->left()->setParent(retTL); 1.85 + retTL->left()->set_parent(retTL); 1.86 } 1.87 retTL->link_head(nextTC); 1.88 - assert(nextTC->isFree(), "Should be a free chunk"); 1.89 + assert(nextTC->is_free(), "Should be a free chunk"); 1.90 } 1.91 } else { 1.92 if (nextTC == NULL) { 1.93 @@ -173,7 +173,7 @@ 1.94 link_tail(prevFC); 1.95 } 1.96 // Chunk is interior to the list 1.97 - prevFC->linkAfter(nextTC); 1.98 + prevFC->link_after(nextTC); 1.99 } 1.100 1.101 // Below this point the embeded TreeList<Chunk> being used for the 1.102 @@ -183,8 +183,8 @@ 1.103 assert(!retTL->head() || retTL->size() == retTL->head()->size(), 1.104 "Wrong sized chunk in list"); 1.105 debug_only( 1.106 - tc->linkPrev(NULL); 1.107 - tc->linkNext(NULL); 1.108 + tc->link_prev(NULL); 1.109 + tc->link_next(NULL); 1.110 tc->set_list(NULL); 1.111 bool prev_found = false; 1.112 bool next_found = false; 1.113 @@ -207,7 +207,7 @@ 1.114 ) 1.115 retTL->decrement_count(); 1.116 1.117 - assert(tc->isFree(), "Should still be a free chunk"); 1.118 + assert(tc->is_free(), "Should still be a free chunk"); 1.119 assert(retTL->head() == NULL || retTL->head()->prev() == NULL, 1.120 "list invariant"); 1.121 assert(retTL->tail() == NULL || retTL->tail()->next() == NULL, 1.122 @@ -216,22 +216,22 @@ 1.123 } 1.124 1.125 template <class Chunk> 1.126 -void TreeList<Chunk>::returnChunkAtTail(TreeChunk<Chunk>* chunk) { 1.127 +void TreeList<Chunk>::return_chunk_at_tail(TreeChunk<Chunk>* chunk) { 1.128 assert(chunk != NULL, "returning NULL chunk"); 1.129 assert(chunk->list() == this, "list should be set for chunk"); 1.130 assert(tail() != NULL, "The tree list is embedded in the first chunk"); 1.131 // which means that the list can never be empty. 1.132 - assert(!verifyChunkInFreeLists(chunk), "Double entry"); 1.133 + assert(!verify_chunk_in_free_list(chunk), "Double entry"); 1.134 assert(head() == NULL || head()->prev() == NULL, "list invariant"); 1.135 assert(tail() == NULL || tail()->next() == NULL, "list invariant"); 1.136 1.137 Chunk* fc = tail(); 1.138 - fc->linkAfter(chunk); 1.139 + fc->link_after(chunk); 1.140 link_tail(chunk); 1.141 1.142 assert(!tail() || size() == tail()->size(), "Wrong sized chunk in list"); 1.143 FreeList<Chunk>::increment_count(); 1.144 - debug_only(increment_returnedBytes_by(chunk->size()*sizeof(HeapWord));) 1.145 + debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));) 1.146 assert(head() == NULL || head()->prev() == NULL, "list invariant"); 1.147 assert(tail() == NULL || tail()->next() == NULL, "list invariant"); 1.148 } 1.149 @@ -241,25 +241,25 @@ 1.150 // because the TreeList<Chunk> is embedded in the first TreeChunk<Chunk> in the 1.151 // list. See the definition of TreeChunk<Chunk>. 1.152 template <class Chunk> 1.153 -void TreeList<Chunk>::returnChunkAtHead(TreeChunk<Chunk>* chunk) { 1.154 +void TreeList<Chunk>::return_chunk_at_head(TreeChunk<Chunk>* chunk) { 1.155 assert(chunk->list() == this, "list should be set for chunk"); 1.156 assert(head() != NULL, "The tree list is embedded in the first chunk"); 1.157 assert(chunk != NULL, "returning NULL chunk"); 1.158 - assert(!verifyChunkInFreeLists(chunk), "Double entry"); 1.159 + assert(!verify_chunk_in_free_list(chunk), "Double entry"); 1.160 assert(head() == NULL || head()->prev() == NULL, "list invariant"); 1.161 assert(tail() == NULL || tail()->next() == NULL, "list invariant"); 1.162 1.163 Chunk* fc = head()->next(); 1.164 if (fc != NULL) { 1.165 - chunk->linkAfter(fc); 1.166 + chunk->link_after(fc); 1.167 } else { 1.168 assert(tail() == NULL, "List is inconsistent"); 1.169 link_tail(chunk); 1.170 } 1.171 - head()->linkAfter(chunk); 1.172 + head()->link_after(chunk); 1.173 assert(!head() || size() == head()->size(), "Wrong sized chunk in list"); 1.174 FreeList<Chunk>::increment_count(); 1.175 - debug_only(increment_returnedBytes_by(chunk->size()*sizeof(HeapWord));) 1.176 + debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));) 1.177 assert(head() == NULL || head()->prev() == NULL, "list invariant"); 1.178 assert(tail() == NULL || tail()->next() == NULL, "list invariant"); 1.179 } 1.180 @@ -314,7 +314,7 @@ 1.181 template <class Chunk> 1.182 BinaryTreeDictionary<Chunk>::BinaryTreeDictionary(bool adaptive_freelists, bool splay) : 1.183 _splay(splay), _adaptive_freelists(adaptive_freelists), 1.184 - _totalSize(0), _totalFreeBlocks(0), _root(0) {} 1.185 + _total_size(0), _total_free_blocks(0), _root(0) {} 1.186 1.187 template <class Chunk> 1.188 BinaryTreeDictionary<Chunk>::BinaryTreeDictionary(MemRegion mr, 1.189 @@ -329,26 +329,26 @@ 1.190 assert(root()->right() == NULL, "reset check failed"); 1.191 assert(root()->head()->next() == NULL, "reset check failed"); 1.192 assert(root()->head()->prev() == NULL, "reset check failed"); 1.193 - assert(totalSize() == root()->size(), "reset check failed"); 1.194 - assert(totalFreeBlocks() == 1, "reset check failed"); 1.195 + assert(total_size() == root()->size(), "reset check failed"); 1.196 + assert(total_free_blocks() == 1, "reset check failed"); 1.197 } 1.198 1.199 template <class Chunk> 1.200 -void BinaryTreeDictionary<Chunk>::inc_totalSize(size_t inc) { 1.201 - _totalSize = _totalSize + inc; 1.202 +void BinaryTreeDictionary<Chunk>::inc_total_size(size_t inc) { 1.203 + _total_size = _total_size + inc; 1.204 } 1.205 1.206 template <class Chunk> 1.207 -void BinaryTreeDictionary<Chunk>::dec_totalSize(size_t dec) { 1.208 - _totalSize = _totalSize - dec; 1.209 +void BinaryTreeDictionary<Chunk>::dec_total_size(size_t dec) { 1.210 + _total_size = _total_size - dec; 1.211 } 1.212 1.213 template <class Chunk> 1.214 void BinaryTreeDictionary<Chunk>::reset(MemRegion mr) { 1.215 assert(mr.word_size() >= BinaryTreeDictionary<Chunk>::min_tree_chunk_size, "minimum chunk size"); 1.216 set_root(TreeList<Chunk>::as_TreeList(mr.start(), mr.word_size())); 1.217 - set_totalSize(mr.word_size()); 1.218 - set_totalFreeBlocks(1); 1.219 + set_total_size(mr.word_size()); 1.220 + set_total_free_blocks(1); 1.221 } 1.222 1.223 template <class Chunk> 1.224 @@ -360,8 +360,8 @@ 1.225 template <class Chunk> 1.226 void BinaryTreeDictionary<Chunk>::reset() { 1.227 set_root(NULL); 1.228 - set_totalSize(0); 1.229 - set_totalFreeBlocks(0); 1.230 + set_total_size(0); 1.231 + set_total_free_blocks(0); 1.232 } 1.233 1.234 // Get a free block of size at least size from tree, or NULL. 1.235 @@ -374,13 +374,13 @@ 1.236 // node is replaced in place by its tree successor. 1.237 template <class Chunk> 1.238 TreeChunk<Chunk>* 1.239 -BinaryTreeDictionary<Chunk>::getChunkFromTree(size_t size, enum FreeBlockDictionary<Chunk>::Dither dither, bool splay) 1.240 +BinaryTreeDictionary<Chunk>::get_chunk_from_tree(size_t size, enum FreeBlockDictionary<Chunk>::Dither dither, bool splay) 1.241 { 1.242 TreeList<Chunk> *curTL, *prevTL; 1.243 TreeChunk<Chunk>* retTC = NULL; 1.244 assert(size >= BinaryTreeDictionary<Chunk>::min_tree_chunk_size, "minimum chunk size"); 1.245 if (FLSVerifyDictionary) { 1.246 - verifyTree(); 1.247 + verify_tree(); 1.248 } 1.249 // starting at the root, work downwards trying to find match. 1.250 // Remember the last node of size too great or too small. 1.251 @@ -421,7 +421,7 @@ 1.252 while (hintTL->hint() != 0) { 1.253 assert(hintTL->hint() == 0 || hintTL->hint() > hintTL->size(), 1.254 "hint points in the wrong direction"); 1.255 - hintTL = findList(hintTL->hint()); 1.256 + hintTL = find_list(hintTL->hint()); 1.257 assert(curTL != hintTL, "Infinite loop"); 1.258 if (hintTL == NULL || 1.259 hintTL == curTL /* Should not happen but protect against it */ ) { 1.260 @@ -448,15 +448,15 @@ 1.261 } 1.262 // don't waste time splaying if chunk's singleton 1.263 if (splay && curTL->head()->next() != NULL) { 1.264 - semiSplayStep(curTL); 1.265 + semi_splay_step(curTL); 1.266 } 1.267 retTC = curTL->first_available(); 1.268 assert((retTC != NULL) && (curTL->count() > 0), 1.269 "A list in the binary tree should not be NULL"); 1.270 assert(retTC->size() >= size, 1.271 "A chunk of the wrong size was found"); 1.272 - removeChunkFromTree(retTC); 1.273 - assert(retTC->isFree(), "Header is not marked correctly"); 1.274 + remove_chunk_from_tree(retTC); 1.275 + assert(retTC->is_free(), "Header is not marked correctly"); 1.276 } 1.277 1.278 if (FLSVerifyDictionary) { 1.279 @@ -466,7 +466,7 @@ 1.280 } 1.281 1.282 template <class Chunk> 1.283 -TreeList<Chunk>* BinaryTreeDictionary<Chunk>::findList(size_t size) const { 1.284 +TreeList<Chunk>* BinaryTreeDictionary<Chunk>::find_list(size_t size) const { 1.285 TreeList<Chunk>* curTL; 1.286 for (curTL = root(); curTL != NULL;) { 1.287 if (curTL->size() == size) { // exact match 1.288 @@ -485,18 +485,18 @@ 1.289 1.290 1.291 template <class Chunk> 1.292 -bool BinaryTreeDictionary<Chunk>::verifyChunkInFreeLists(Chunk* tc) const { 1.293 +bool BinaryTreeDictionary<Chunk>::verify_chunk_in_free_list(Chunk* tc) const { 1.294 size_t size = tc->size(); 1.295 - TreeList<Chunk>* tl = findList(size); 1.296 + TreeList<Chunk>* tl = find_list(size); 1.297 if (tl == NULL) { 1.298 return false; 1.299 } else { 1.300 - return tl->verifyChunkInFreeLists(tc); 1.301 + return tl->verify_chunk_in_free_list(tc); 1.302 } 1.303 } 1.304 1.305 template <class Chunk> 1.306 -Chunk* BinaryTreeDictionary<Chunk>::findLargestDict() const { 1.307 +Chunk* BinaryTreeDictionary<Chunk>::find_largest_dict() const { 1.308 TreeList<Chunk> *curTL = root(); 1.309 if (curTL != NULL) { 1.310 while(curTL->right() != NULL) curTL = curTL->right(); 1.311 @@ -512,9 +512,9 @@ 1.312 // remove the node and repair the tree. 1.313 template <class Chunk> 1.314 TreeChunk<Chunk>* 1.315 -BinaryTreeDictionary<Chunk>::removeChunkFromTree(TreeChunk<Chunk>* tc) { 1.316 +BinaryTreeDictionary<Chunk>::remove_chunk_from_tree(TreeChunk<Chunk>* tc) { 1.317 assert(tc != NULL, "Should not call with a NULL chunk"); 1.318 - assert(tc->isFree(), "Header is not marked correctly"); 1.319 + assert(tc->is_free(), "Header is not marked correctly"); 1.320 1.321 TreeList<Chunk> *newTL, *parentTL; 1.322 TreeChunk<Chunk>* retTC; 1.323 @@ -534,13 +534,13 @@ 1.324 assert(tl->parent() == NULL || tl == tl->parent()->left() || 1.325 tl == tl->parent()->right(), "list is inconsistent"); 1.326 1.327 - bool complicatedSplice = false; 1.328 + bool complicated_splice = false; 1.329 1.330 retTC = tc; 1.331 // Removing this chunk can have the side effect of changing the node 1.332 // (TreeList<Chunk>*) in the tree. If the node is the root, update it. 1.333 - TreeList<Chunk>* replacementTL = tl->removeChunkReplaceIfNeeded(tc); 1.334 - assert(tc->isFree(), "Chunk should still be free"); 1.335 + TreeList<Chunk>* replacementTL = tl->remove_chunk_replace_if_needed(tc); 1.336 + assert(tc->is_free(), "Chunk should still be free"); 1.337 assert(replacementTL->parent() == NULL || 1.338 replacementTL == replacementTL->parent()->left() || 1.339 replacementTL == replacementTL->parent()->right(), 1.340 @@ -570,15 +570,15 @@ 1.341 if (replacementTL->left() == NULL) { 1.342 // left is NULL so pick right. right may also be NULL. 1.343 newTL = replacementTL->right(); 1.344 - debug_only(replacementTL->clearRight();) 1.345 + debug_only(replacementTL->clear_right();) 1.346 } else if (replacementTL->right() == NULL) { 1.347 // right is NULL 1.348 newTL = replacementTL->left(); 1.349 debug_only(replacementTL->clearLeft();) 1.350 } else { // we have both children, so, by patriarchal convention, 1.351 // my replacement is least node in right sub-tree 1.352 - complicatedSplice = true; 1.353 - newTL = removeTreeMinimum(replacementTL->right()); 1.354 + complicated_splice = true; 1.355 + newTL = remove_tree_minimum(replacementTL->right()); 1.356 assert(newTL != NULL && newTL->left() == NULL && 1.357 newTL->right() == NULL, "sub-tree minimum exists"); 1.358 } 1.359 @@ -586,7 +586,7 @@ 1.360 // newTL may be NULL. 1.361 // should verify; we just cleanly excised our replacement 1.362 if (FLSVerifyDictionary) { 1.363 - verifyTree(); 1.364 + verify_tree(); 1.365 } 1.366 // first make newTL my parent's child 1.367 if ((parentTL = replacementTL->parent()) == NULL) { 1.368 @@ -594,35 +594,35 @@ 1.369 assert(tl == root(), "Incorrectly replacing root"); 1.370 set_root(newTL); 1.371 if (newTL != NULL) { 1.372 - newTL->clearParent(); 1.373 + newTL->clear_parent(); 1.374 } 1.375 } else if (parentTL->right() == replacementTL) { 1.376 // replacementTL is a right child 1.377 - parentTL->setRight(newTL); 1.378 + parentTL->set_right(newTL); 1.379 } else { // replacementTL is a left child 1.380 assert(parentTL->left() == replacementTL, "should be left child"); 1.381 - parentTL->setLeft(newTL); 1.382 + parentTL->set_left(newTL); 1.383 } 1.384 - debug_only(replacementTL->clearParent();) 1.385 - if (complicatedSplice) { // we need newTL to get replacementTL's 1.386 + debug_only(replacementTL->clear_parent();) 1.387 + if (complicated_splice) { // we need newTL to get replacementTL's 1.388 // two children 1.389 assert(newTL != NULL && 1.390 newTL->left() == NULL && newTL->right() == NULL, 1.391 "newTL should not have encumbrances from the past"); 1.392 // we'd like to assert as below: 1.393 // assert(replacementTL->left() != NULL && replacementTL->right() != NULL, 1.394 - // "else !complicatedSplice"); 1.395 + // "else !complicated_splice"); 1.396 // ... however, the above assertion is too strong because we aren't 1.397 // guaranteed that replacementTL->right() is still NULL. 1.398 // Recall that we removed 1.399 // the right sub-tree minimum from replacementTL. 1.400 // That may well have been its right 1.401 // child! So we'll just assert half of the above: 1.402 - assert(replacementTL->left() != NULL, "else !complicatedSplice"); 1.403 - newTL->setLeft(replacementTL->left()); 1.404 - newTL->setRight(replacementTL->right()); 1.405 + assert(replacementTL->left() != NULL, "else !complicated_splice"); 1.406 + newTL->set_left(replacementTL->left()); 1.407 + newTL->set_right(replacementTL->right()); 1.408 debug_only( 1.409 - replacementTL->clearRight(); 1.410 + replacementTL->clear_right(); 1.411 replacementTL->clearLeft(); 1.412 ) 1.413 } 1.414 @@ -632,16 +632,16 @@ 1.415 "delete without encumbrances"); 1.416 } 1.417 1.418 - assert(totalSize() >= retTC->size(), "Incorrect total size"); 1.419 - dec_totalSize(retTC->size()); // size book-keeping 1.420 - assert(totalFreeBlocks() > 0, "Incorrect total count"); 1.421 - set_totalFreeBlocks(totalFreeBlocks() - 1); 1.422 + assert(total_size() >= retTC->size(), "Incorrect total size"); 1.423 + dec_total_size(retTC->size()); // size book-keeping 1.424 + assert(total_free_blocks() > 0, "Incorrect total count"); 1.425 + set_total_free_blocks(total_free_blocks() - 1); 1.426 1.427 assert(retTC != NULL, "null chunk?"); 1.428 assert(retTC->prev() == NULL && retTC->next() == NULL, 1.429 "should return without encumbrances"); 1.430 if (FLSVerifyDictionary) { 1.431 - verifyTree(); 1.432 + verify_tree(); 1.433 } 1.434 assert(!removing_only_chunk || _root == NULL, "root should be NULL"); 1.435 return TreeChunk<Chunk>::as_TreeChunk(retTC); 1.436 @@ -651,7 +651,7 @@ 1.437 // If lm has a right child, link it to the left node of 1.438 // the parent of lm. 1.439 template <class Chunk> 1.440 -TreeList<Chunk>* BinaryTreeDictionary<Chunk>::removeTreeMinimum(TreeList<Chunk>* tl) { 1.441 +TreeList<Chunk>* BinaryTreeDictionary<Chunk>::remove_tree_minimum(TreeList<Chunk>* tl) { 1.442 assert(tl != NULL && tl->parent() != NULL, "really need a proper sub-tree"); 1.443 // locate the subtree minimum by walking down left branches 1.444 TreeList<Chunk>* curTL = tl; 1.445 @@ -660,12 +660,12 @@ 1.446 if (curTL != root()) { // Should this test just be removed? 1.447 TreeList<Chunk>* parentTL = curTL->parent(); 1.448 if (parentTL->left() == curTL) { // curTL is a left child 1.449 - parentTL->setLeft(curTL->right()); 1.450 + parentTL->set_left(curTL->right()); 1.451 } else { 1.452 // If the list tl has no left child, then curTL may be 1.453 // the right child of parentTL. 1.454 assert(parentTL->right() == curTL, "should be a right child"); 1.455 - parentTL->setRight(curTL->right()); 1.456 + parentTL->set_right(curTL->right()); 1.457 } 1.458 } else { 1.459 // The only use of this method would not pass the root of the 1.460 @@ -675,12 +675,12 @@ 1.461 set_root(NULL); 1.462 } 1.463 debug_only( 1.464 - curTL->clearParent(); // Test if this needs to be cleared 1.465 - curTL->clearRight(); // recall, above, left child is already null 1.466 + curTL->clear_parent(); // Test if this needs to be cleared 1.467 + curTL->clear_right(); // recall, above, left child is already null 1.468 ) 1.469 // we just excised a (non-root) node, we should still verify all tree invariants 1.470 if (FLSVerifyDictionary) { 1.471 - verifyTree(); 1.472 + verify_tree(); 1.473 } 1.474 return curTL; 1.475 } 1.476 @@ -694,7 +694,7 @@ 1.477 // [Measurements will be needed to (in)validate this expectation.] 1.478 1.479 template <class Chunk> 1.480 -void BinaryTreeDictionary<Chunk>::semiSplayStep(TreeList<Chunk>* tc) { 1.481 +void BinaryTreeDictionary<Chunk>::semi_splay_step(TreeList<Chunk>* tc) { 1.482 // apply a semi-splay step at the given node: 1.483 // . if root, norting needs to be done 1.484 // . if child of root, splay once 1.485 @@ -705,17 +705,17 @@ 1.486 } 1.487 1.488 template <class Chunk> 1.489 -void BinaryTreeDictionary<Chunk>::insertChunkInTree(Chunk* fc) { 1.490 +void BinaryTreeDictionary<Chunk>::insert_chunk_in_tree(Chunk* fc) { 1.491 TreeList<Chunk> *curTL, *prevTL; 1.492 size_t size = fc->size(); 1.493 1.494 assert(size >= BinaryTreeDictionary<Chunk>::min_tree_chunk_size, "too small to be a TreeList<Chunk>"); 1.495 if (FLSVerifyDictionary) { 1.496 - verifyTree(); 1.497 + verify_tree(); 1.498 } 1.499 1.500 - fc->clearNext(); 1.501 - fc->linkPrev(NULL); 1.502 + fc->clear_next(); 1.503 + fc->link_prev(NULL); 1.504 1.505 // work down from the _root, looking for insertion point 1.506 for (prevTL = curTL = root(); curTL != NULL;) { 1.507 @@ -735,10 +735,10 @@ 1.508 tc->initialize(); 1.509 if (curTL != NULL) { // exact match 1.510 tc->set_list(curTL); 1.511 - curTL->returnChunkAtTail(tc); 1.512 + curTL->return_chunk_at_tail(tc); 1.513 } else { // need a new node in tree 1.514 - tc->clearNext(); 1.515 - tc->linkPrev(NULL); 1.516 + tc->clear_next(); 1.517 + tc->link_prev(NULL); 1.518 TreeList<Chunk>* newTL = TreeList<Chunk>::as_TreeList(tc); 1.519 assert(((TreeChunk<Chunk>*)tc)->list() == newTL, 1.520 "List was not initialized correctly"); 1.521 @@ -748,28 +748,28 @@ 1.522 } else { // insert under prevTL ... 1.523 if (prevTL->size() < size) { // am right child 1.524 assert(prevTL->right() == NULL, "control point invariant"); 1.525 - prevTL->setRight(newTL); 1.526 + prevTL->set_right(newTL); 1.527 } else { // am left child 1.528 assert(prevTL->size() > size && prevTL->left() == NULL, "cpt pt inv"); 1.529 - prevTL->setLeft(newTL); 1.530 + prevTL->set_left(newTL); 1.531 } 1.532 } 1.533 } 1.534 assert(tc->list() != NULL, "Tree list should be set"); 1.535 1.536 - inc_totalSize(size); 1.537 - // Method 'totalSizeInTree' walks through the every block in the 1.538 + inc_total_size(size); 1.539 + // Method 'total_size_in_tree' walks through the every block in the 1.540 // tree, so it can cause significant performance loss if there are 1.541 // many blocks in the tree 1.542 - assert(!FLSVerifyDictionary || totalSizeInTree(root()) == totalSize(), "_totalSize inconsistency"); 1.543 - set_totalFreeBlocks(totalFreeBlocks() + 1); 1.544 + assert(!FLSVerifyDictionary || total_size_in_tree(root()) == total_size(), "_total_size inconsistency"); 1.545 + set_total_free_blocks(total_free_blocks() + 1); 1.546 if (FLSVerifyDictionary) { 1.547 - verifyTree(); 1.548 + verify_tree(); 1.549 } 1.550 } 1.551 1.552 template <class Chunk> 1.553 -size_t BinaryTreeDictionary<Chunk>::maxChunkSize() const { 1.554 +size_t BinaryTreeDictionary<Chunk>::max_chunk_size() const { 1.555 FreeBlockDictionary<Chunk>::verify_par_locked(); 1.556 TreeList<Chunk>* tc = root(); 1.557 if (tc == NULL) return 0; 1.558 @@ -778,7 +778,7 @@ 1.559 } 1.560 1.561 template <class Chunk> 1.562 -size_t BinaryTreeDictionary<Chunk>::totalListLength(TreeList<Chunk>* tl) const { 1.563 +size_t BinaryTreeDictionary<Chunk>::total_list_length(TreeList<Chunk>* tl) const { 1.564 size_t res; 1.565 res = tl->count(); 1.566 #ifdef ASSERT 1.567 @@ -791,12 +791,12 @@ 1.568 } 1.569 1.570 template <class Chunk> 1.571 -size_t BinaryTreeDictionary<Chunk>::totalSizeInTree(TreeList<Chunk>* tl) const { 1.572 +size_t BinaryTreeDictionary<Chunk>::total_size_in_tree(TreeList<Chunk>* tl) const { 1.573 if (tl == NULL) 1.574 return 0; 1.575 - return (tl->size() * totalListLength(tl)) + 1.576 - totalSizeInTree(tl->left()) + 1.577 - totalSizeInTree(tl->right()); 1.578 + return (tl->size() * total_list_length(tl)) + 1.579 + total_size_in_tree(tl->left()) + 1.580 + total_size_in_tree(tl->right()); 1.581 } 1.582 1.583 template <class Chunk> 1.584 @@ -805,73 +805,73 @@ 1.585 return 0.0; 1.586 } 1.587 double size = (double)(tl->size()); 1.588 - double curr = size * size * totalListLength(tl); 1.589 + double curr = size * size * total_list_length(tl); 1.590 curr += sum_of_squared_block_sizes(tl->left()); 1.591 curr += sum_of_squared_block_sizes(tl->right()); 1.592 return curr; 1.593 } 1.594 1.595 template <class Chunk> 1.596 -size_t BinaryTreeDictionary<Chunk>::totalFreeBlocksInTree(TreeList<Chunk>* tl) const { 1.597 +size_t BinaryTreeDictionary<Chunk>::total_free_blocks_in_tree(TreeList<Chunk>* tl) const { 1.598 if (tl == NULL) 1.599 return 0; 1.600 - return totalListLength(tl) + 1.601 - totalFreeBlocksInTree(tl->left()) + 1.602 - totalFreeBlocksInTree(tl->right()); 1.603 + return total_list_length(tl) + 1.604 + total_free_blocks_in_tree(tl->left()) + 1.605 + total_free_blocks_in_tree(tl->right()); 1.606 } 1.607 1.608 template <class Chunk> 1.609 -size_t BinaryTreeDictionary<Chunk>::numFreeBlocks() const { 1.610 - assert(totalFreeBlocksInTree(root()) == totalFreeBlocks(), 1.611 - "_totalFreeBlocks inconsistency"); 1.612 - return totalFreeBlocks(); 1.613 +size_t BinaryTreeDictionary<Chunk>::num_free_blocks() const { 1.614 + assert(total_free_blocks_in_tree(root()) == total_free_blocks(), 1.615 + "_total_free_blocks inconsistency"); 1.616 + return total_free_blocks(); 1.617 } 1.618 1.619 template <class Chunk> 1.620 -size_t BinaryTreeDictionary<Chunk>::treeHeightHelper(TreeList<Chunk>* tl) const { 1.621 +size_t BinaryTreeDictionary<Chunk>::tree_height_helper(TreeList<Chunk>* tl) const { 1.622 if (tl == NULL) 1.623 return 0; 1.624 - return 1 + MAX2(treeHeightHelper(tl->left()), 1.625 - treeHeightHelper(tl->right())); 1.626 + return 1 + MAX2(tree_height_helper(tl->left()), 1.627 + tree_height_helper(tl->right())); 1.628 } 1.629 1.630 template <class Chunk> 1.631 size_t BinaryTreeDictionary<Chunk>::treeHeight() const { 1.632 - return treeHeightHelper(root()); 1.633 + return tree_height_helper(root()); 1.634 } 1.635 1.636 template <class Chunk> 1.637 -size_t BinaryTreeDictionary<Chunk>::totalNodesHelper(TreeList<Chunk>* tl) const { 1.638 +size_t BinaryTreeDictionary<Chunk>::total_nodes_helper(TreeList<Chunk>* tl) const { 1.639 if (tl == NULL) { 1.640 return 0; 1.641 } 1.642 - return 1 + totalNodesHelper(tl->left()) + 1.643 - totalNodesHelper(tl->right()); 1.644 + return 1 + total_nodes_helper(tl->left()) + 1.645 + total_nodes_helper(tl->right()); 1.646 } 1.647 1.648 template <class Chunk> 1.649 -size_t BinaryTreeDictionary<Chunk>::totalNodesInTree(TreeList<Chunk>* tl) const { 1.650 - return totalNodesHelper(root()); 1.651 +size_t BinaryTreeDictionary<Chunk>::total_nodes_in_tree(TreeList<Chunk>* tl) const { 1.652 + return total_nodes_helper(root()); 1.653 } 1.654 1.655 template <class Chunk> 1.656 -void BinaryTreeDictionary<Chunk>::dictCensusUpdate(size_t size, bool split, bool birth){ 1.657 - TreeList<Chunk>* nd = findList(size); 1.658 +void BinaryTreeDictionary<Chunk>::dict_census_udpate(size_t size, bool split, bool birth){ 1.659 + TreeList<Chunk>* nd = find_list(size); 1.660 if (nd) { 1.661 if (split) { 1.662 if (birth) { 1.663 - nd->increment_splitBirths(); 1.664 + nd->increment_split_births(); 1.665 nd->increment_surplus(); 1.666 } else { 1.667 - nd->increment_splitDeaths(); 1.668 + nd->increment_split_deaths(); 1.669 nd->decrement_surplus(); 1.670 } 1.671 } else { 1.672 if (birth) { 1.673 - nd->increment_coalBirths(); 1.674 + nd->increment_coal_births(); 1.675 nd->increment_surplus(); 1.676 } else { 1.677 - nd->increment_coalDeaths(); 1.678 + nd->increment_coal_deaths(); 1.679 nd->decrement_surplus(); 1.680 } 1.681 } 1.682 @@ -884,13 +884,13 @@ 1.683 } 1.684 1.685 template <class Chunk> 1.686 -bool BinaryTreeDictionary<Chunk>::coalDictOverPopulated(size_t size) { 1.687 +bool BinaryTreeDictionary<Chunk>::coal_dict_over_populated(size_t size) { 1.688 if (FLSAlwaysCoalesceLarge) return true; 1.689 1.690 - TreeList<Chunk>* list_of_size = findList(size); 1.691 + TreeList<Chunk>* list_of_size = find_list(size); 1.692 // None of requested size implies overpopulated. 1.693 - return list_of_size == NULL || list_of_size->coalDesired() <= 0 || 1.694 - list_of_size->count() > list_of_size->coalDesired(); 1.695 + return list_of_size == NULL || list_of_size->coal_desired() <= 0 || 1.696 + list_of_size->count() > list_of_size->coal_desired(); 1.697 } 1.698 1.699 // Closures for walking the binary tree. 1.700 @@ -952,9 +952,9 @@ 1.701 void do_list(FreeList<Chunk>* fl) { 1.702 double coalSurplusPercent = _percentage; 1.703 fl->compute_desired(_inter_sweep_current, _inter_sweep_estimate, _intra_sweep_estimate); 1.704 - fl->set_coalDesired((ssize_t)((double)fl->desired() * coalSurplusPercent)); 1.705 - fl->set_beforeSweep(fl->count()); 1.706 - fl->set_bfrSurp(fl->surplus()); 1.707 + fl->set_coal_desired((ssize_t)((double)fl->desired() * coalSurplusPercent)); 1.708 + fl->set_before_sweep(fl->count()); 1.709 + fl->set_bfr_surp(fl->surplus()); 1.710 } 1.711 }; 1.712 1.713 @@ -1031,7 +1031,7 @@ 1.714 } 1.715 1.716 template <class Chunk> 1.717 -void BinaryTreeDictionary<Chunk>::beginSweepDictCensus(double coalSurplusPercent, 1.718 +void BinaryTreeDictionary<Chunk>::begin_sweep_dict_census(double coalSurplusPercent, 1.719 float inter_sweep_current, float inter_sweep_estimate, float intra_sweep_estimate) { 1.720 BeginSweepClosure<Chunk> bsc(coalSurplusPercent, inter_sweep_current, 1.721 inter_sweep_estimate, 1.722 @@ -1046,33 +1046,33 @@ 1.723 class InitializeDictReturnedBytesClosure : public AscendTreeCensusClosure<Chunk> { 1.724 public: 1.725 void do_list(FreeList<Chunk>* fl) { 1.726 - fl->set_returnedBytes(0); 1.727 + fl->set_returned_bytes(0); 1.728 } 1.729 }; 1.730 1.731 template <class Chunk> 1.732 -void BinaryTreeDictionary<Chunk>::initializeDictReturnedBytes() { 1.733 +void BinaryTreeDictionary<Chunk>::initialize_dict_returned_bytes() { 1.734 InitializeDictReturnedBytesClosure<Chunk> idrb; 1.735 idrb.do_tree(root()); 1.736 } 1.737 1.738 template <class Chunk> 1.739 class ReturnedBytesClosure : public AscendTreeCensusClosure<Chunk> { 1.740 - size_t _dictReturnedBytes; 1.741 + size_t _dict_returned_bytes; 1.742 public: 1.743 - ReturnedBytesClosure() { _dictReturnedBytes = 0; } 1.744 + ReturnedBytesClosure() { _dict_returned_bytes = 0; } 1.745 void do_list(FreeList<Chunk>* fl) { 1.746 - _dictReturnedBytes += fl->returnedBytes(); 1.747 + _dict_returned_bytes += fl->returned_bytes(); 1.748 } 1.749 - size_t dictReturnedBytes() { return _dictReturnedBytes; } 1.750 + size_t dict_returned_bytes() { return _dict_returned_bytes; } 1.751 }; 1.752 1.753 template <class Chunk> 1.754 -size_t BinaryTreeDictionary<Chunk>::sumDictReturnedBytes() { 1.755 +size_t BinaryTreeDictionary<Chunk>::sum_dict_returned_bytes() { 1.756 ReturnedBytesClosure<Chunk> rbc; 1.757 rbc.do_tree(root()); 1.758 1.759 - return rbc.dictReturnedBytes(); 1.760 + return rbc.dict_returned_bytes(); 1.761 } 1.762 1.763 // Count the number of entries in the tree. 1.764 @@ -1087,7 +1087,7 @@ 1.765 }; 1.766 1.767 template <class Chunk> 1.768 -size_t BinaryTreeDictionary<Chunk>::totalCount() { 1.769 +size_t BinaryTreeDictionary<Chunk>::total_count() { 1.770 treeCountClosure<Chunk> ctc(0); 1.771 ctc.do_tree(root()); 1.772 return ctc.count; 1.773 @@ -1108,7 +1108,7 @@ 1.774 }; 1.775 1.776 template <class Chunk> 1.777 -void BinaryTreeDictionary<Chunk>::setTreeSurplus(double splitSurplusPercent) { 1.778 +void BinaryTreeDictionary<Chunk>::set_tree_surplus(double splitSurplusPercent) { 1.779 setTreeSurplusClosure<Chunk> sts(splitSurplusPercent); 1.780 sts.do_tree(root()); 1.781 } 1.782 @@ -1130,7 +1130,7 @@ 1.783 }; 1.784 1.785 template <class Chunk> 1.786 -void BinaryTreeDictionary<Chunk>::setTreeHints(void) { 1.787 +void BinaryTreeDictionary<Chunk>::set_tree_hints(void) { 1.788 setTreeHintsClosure<Chunk> sth(0); 1.789 sth.do_tree(root()); 1.790 } 1.791 @@ -1139,45 +1139,45 @@ 1.792 template <class Chunk> 1.793 class clearTreeCensusClosure : public AscendTreeCensusClosure<Chunk> { 1.794 void do_list(FreeList<Chunk>* fl) { 1.795 - fl->set_prevSweep(fl->count()); 1.796 - fl->set_coalBirths(0); 1.797 - fl->set_coalDeaths(0); 1.798 - fl->set_splitBirths(0); 1.799 - fl->set_splitDeaths(0); 1.800 + fl->set_prev_sweep(fl->count()); 1.801 + fl->set_coal_births(0); 1.802 + fl->set_coal_deaths(0); 1.803 + fl->set_split_births(0); 1.804 + fl->set_split_deaths(0); 1.805 } 1.806 }; 1.807 1.808 template <class Chunk> 1.809 -void BinaryTreeDictionary<Chunk>::clearTreeCensus(void) { 1.810 +void BinaryTreeDictionary<Chunk>::clear_tree_census(void) { 1.811 clearTreeCensusClosure<Chunk> ctc; 1.812 ctc.do_tree(root()); 1.813 } 1.814 1.815 // Do reporting and post sweep clean up. 1.816 template <class Chunk> 1.817 -void BinaryTreeDictionary<Chunk>::endSweepDictCensus(double splitSurplusPercent) { 1.818 +void BinaryTreeDictionary<Chunk>::end_sweep_dict_census(double splitSurplusPercent) { 1.819 // Does walking the tree 3 times hurt? 1.820 - setTreeSurplus(splitSurplusPercent); 1.821 - setTreeHints(); 1.822 + set_tree_surplus(splitSurplusPercent); 1.823 + set_tree_hints(); 1.824 if (PrintGC && Verbose) { 1.825 - reportStatistics(); 1.826 + report_statistics(); 1.827 } 1.828 - clearTreeCensus(); 1.829 + clear_tree_census(); 1.830 } 1.831 1.832 // Print summary statistics 1.833 template <class Chunk> 1.834 -void BinaryTreeDictionary<Chunk>::reportStatistics() const { 1.835 +void BinaryTreeDictionary<Chunk>::report_statistics() const { 1.836 FreeBlockDictionary<Chunk>::verify_par_locked(); 1.837 gclog_or_tty->print("Statistics for BinaryTreeDictionary:\n" 1.838 "------------------------------------\n"); 1.839 - size_t totalSize = totalChunkSize(debug_only(NULL)); 1.840 - size_t freeBlocks = numFreeBlocks(); 1.841 - gclog_or_tty->print("Total Free Space: %d\n", totalSize); 1.842 - gclog_or_tty->print("Max Chunk Size: %d\n", maxChunkSize()); 1.843 - gclog_or_tty->print("Number of Blocks: %d\n", freeBlocks); 1.844 - if (freeBlocks > 0) { 1.845 - gclog_or_tty->print("Av. Block Size: %d\n", totalSize/freeBlocks); 1.846 + size_t total_size = total_chunk_size(debug_only(NULL)); 1.847 + size_t free_blocks = num_free_blocks(); 1.848 + gclog_or_tty->print("Total Free Space: %d\n", total_size); 1.849 + gclog_or_tty->print("Max Chunk Size: %d\n", max_chunk_size()); 1.850 + gclog_or_tty->print("Number of Blocks: %d\n", free_blocks); 1.851 + if (free_blocks > 0) { 1.852 + gclog_or_tty->print("Av. Block Size: %d\n", total_size/free_blocks); 1.853 } 1.854 gclog_or_tty->print("Tree Height: %d\n", treeHeight()); 1.855 } 1.856 @@ -1188,38 +1188,38 @@ 1.857 template <class Chunk> 1.858 class PrintTreeCensusClosure : public AscendTreeCensusClosure<Chunk> { 1.859 int _print_line; 1.860 - size_t _totalFree; 1.861 + size_t _total_free; 1.862 FreeList<Chunk> _total; 1.863 1.864 public: 1.865 PrintTreeCensusClosure() { 1.866 _print_line = 0; 1.867 - _totalFree = 0; 1.868 + _total_free = 0; 1.869 } 1.870 FreeList<Chunk>* total() { return &_total; } 1.871 - size_t totalFree() { return _totalFree; } 1.872 + size_t total_free() { return _total_free; } 1.873 void do_list(FreeList<Chunk>* fl) { 1.874 if (++_print_line >= 40) { 1.875 FreeList<Chunk>::print_labels_on(gclog_or_tty, "size"); 1.876 _print_line = 0; 1.877 } 1.878 fl->print_on(gclog_or_tty); 1.879 - _totalFree += fl->count() * fl->size() ; 1.880 + _total_free += fl->count() * fl->size() ; 1.881 total()->set_count( total()->count() + fl->count() ); 1.882 - total()->set_bfrSurp( total()->bfrSurp() + fl->bfrSurp() ); 1.883 - total()->set_surplus( total()->splitDeaths() + fl->surplus() ); 1.884 + total()->set_bfr_surp( total()->bfr_surp() + fl->bfr_surp() ); 1.885 + total()->set_surplus( total()->split_deaths() + fl->surplus() ); 1.886 total()->set_desired( total()->desired() + fl->desired() ); 1.887 - total()->set_prevSweep( total()->prevSweep() + fl->prevSweep() ); 1.888 - total()->set_beforeSweep(total()->beforeSweep() + fl->beforeSweep()); 1.889 - total()->set_coalBirths( total()->coalBirths() + fl->coalBirths() ); 1.890 - total()->set_coalDeaths( total()->coalDeaths() + fl->coalDeaths() ); 1.891 - total()->set_splitBirths(total()->splitBirths() + fl->splitBirths()); 1.892 - total()->set_splitDeaths(total()->splitDeaths() + fl->splitDeaths()); 1.893 + total()->set_prev_sweep( total()->prev_sweep() + fl->prev_sweep() ); 1.894 + total()->set_before_sweep(total()->before_sweep() + fl->before_sweep()); 1.895 + total()->set_coal_births( total()->coal_births() + fl->coal_births() ); 1.896 + total()->set_coal_deaths( total()->coal_deaths() + fl->coal_deaths() ); 1.897 + total()->set_split_births(total()->split_births() + fl->split_births()); 1.898 + total()->set_split_deaths(total()->split_deaths() + fl->split_deaths()); 1.899 } 1.900 }; 1.901 1.902 template <class Chunk> 1.903 -void BinaryTreeDictionary<Chunk>::printDictCensus(void) const { 1.904 +void BinaryTreeDictionary<Chunk>::print_dict_census(void) const { 1.905 1.906 gclog_or_tty->print("\nBinaryTree\n"); 1.907 FreeList<Chunk>::print_labels_on(gclog_or_tty, "size"); 1.908 @@ -1230,12 +1230,12 @@ 1.909 FreeList<Chunk>::print_labels_on(gclog_or_tty, " "); 1.910 total->print_on(gclog_or_tty, "TOTAL\t"); 1.911 gclog_or_tty->print( 1.912 - "totalFree(words): " SIZE_FORMAT_W(16) 1.913 + "total_free(words): " SIZE_FORMAT_W(16) 1.914 " growth: %8.5f deficit: %8.5f\n", 1.915 - ptc.totalFree(), 1.916 - (double)(total->splitBirths() + total->coalBirths() 1.917 - - total->splitDeaths() - total->coalDeaths()) 1.918 - /(total->prevSweep() != 0 ? (double)total->prevSweep() : 1.0), 1.919 + ptc.total_free(), 1.920 + (double)(total->split_births() + total->coal_births() 1.921 + - total->split_deaths() - total->coal_deaths()) 1.922 + /(total->prev_sweep() != 0 ? (double)total->prev_sweep() : 1.0), 1.923 (double)(total->desired() - total->count()) 1.924 /(total->desired() != 0 ? (double)total->desired() : 1.0)); 1.925 } 1.926 @@ -1279,19 +1279,19 @@ 1.927 // . parent and child point to each other 1.928 // . each node's key correctly related to that of its child(ren) 1.929 template <class Chunk> 1.930 -void BinaryTreeDictionary<Chunk>::verifyTree() const { 1.931 - guarantee(root() == NULL || totalFreeBlocks() == 0 || 1.932 - totalSize() != 0, "_totalSize should't be 0?"); 1.933 +void BinaryTreeDictionary<Chunk>::verify_tree() const { 1.934 + guarantee(root() == NULL || total_free_blocks() == 0 || 1.935 + total_size() != 0, "_total_size should't be 0?"); 1.936 guarantee(root() == NULL || root()->parent() == NULL, "_root shouldn't have parent"); 1.937 - verifyTreeHelper(root()); 1.938 + verify_tree_helper(root()); 1.939 } 1.940 1.941 template <class Chunk> 1.942 -size_t BinaryTreeDictionary<Chunk>::verifyPrevFreePtrs(TreeList<Chunk>* tl) { 1.943 +size_t BinaryTreeDictionary<Chunk>::verify_prev_free_ptrs(TreeList<Chunk>* tl) { 1.944 size_t ct = 0; 1.945 for (Chunk* curFC = tl->head(); curFC != NULL; curFC = curFC->next()) { 1.946 ct++; 1.947 - assert(curFC->prev() == NULL || curFC->prev()->isFree(), 1.948 + assert(curFC->prev() == NULL || curFC->prev()->is_free(), 1.949 "Chunk should be free"); 1.950 } 1.951 return ct; 1.952 @@ -1301,7 +1301,7 @@ 1.953 // caution on very deep trees; and watch out for stack overflow errors; 1.954 // In general, to be used only for debugging. 1.955 template <class Chunk> 1.956 -void BinaryTreeDictionary<Chunk>::verifyTreeHelper(TreeList<Chunk>* tl) const { 1.957 +void BinaryTreeDictionary<Chunk>::verify_tree_helper(TreeList<Chunk>* tl) const { 1.958 if (tl == NULL) 1.959 return; 1.960 guarantee(tl->size() != 0, "A list must has a size"); 1.961 @@ -1313,26 +1313,26 @@ 1.962 "parent !> left"); 1.963 guarantee(tl->right() == NULL || tl->right()->size() > tl->size(), 1.964 "parent !< left"); 1.965 - guarantee(tl->head() == NULL || tl->head()->isFree(), "!Free"); 1.966 + guarantee(tl->head() == NULL || tl->head()->is_free(), "!Free"); 1.967 guarantee(tl->head() == NULL || tl->head_as_TreeChunk()->list() == tl, 1.968 "list inconsistency"); 1.969 guarantee(tl->count() > 0 || (tl->head() == NULL && tl->tail() == NULL), 1.970 "list count is inconsistent"); 1.971 guarantee(tl->count() > 1 || tl->head() == tl->tail(), 1.972 "list is incorrectly constructed"); 1.973 - size_t count = verifyPrevFreePtrs(tl); 1.974 + size_t count = verify_prev_free_ptrs(tl); 1.975 guarantee(count == (size_t)tl->count(), "Node count is incorrect"); 1.976 if (tl->head() != NULL) { 1.977 - tl->head_as_TreeChunk()->verifyTreeChunkList(); 1.978 + tl->head_as_TreeChunk()->verify_tree_chunk_list(); 1.979 } 1.980 - verifyTreeHelper(tl->left()); 1.981 - verifyTreeHelper(tl->right()); 1.982 + verify_tree_helper(tl->left()); 1.983 + verify_tree_helper(tl->right()); 1.984 } 1.985 1.986 template <class Chunk> 1.987 void BinaryTreeDictionary<Chunk>::verify() const { 1.988 - verifyTree(); 1.989 - guarantee(totalSize() == totalSizeInTree(root()), "Total Size inconsistency"); 1.990 + verify_tree(); 1.991 + guarantee(total_size() == total_size_in_tree(root()), "Total Size inconsistency"); 1.992 } 1.993 1.994 #ifndef SERIALGC