src/share/vm/memory/binaryTreeDictionary.cpp

changeset 4265
0400886d2613
parent 4196
685df3c6f84b
child 4297
19c1bd641922
equal deleted inserted replaced
4264:6bc207d87e5d 4265:0400886d2613
237 assert(nextTC->is_free(), "Should be a free chunk"); 237 assert(nextTC->is_free(), "Should be a free chunk");
238 } 238 }
239 } else { 239 } else {
240 if (nextTC == NULL) { 240 if (nextTC == NULL) {
241 // Removing chunk at tail of list 241 // Removing chunk at tail of list
242 link_tail(prevFC); 242 this->link_tail(prevFC);
243 } 243 }
244 // Chunk is interior to the list 244 // Chunk is interior to the list
245 prevFC->link_after(nextTC); 245 prevFC->link_after(nextTC);
246 } 246 }
247 247
294 assert(head() == NULL || head()->prev() == NULL, "list invariant"); 294 assert(head() == NULL || head()->prev() == NULL, "list invariant");
295 assert(tail() == NULL || tail()->next() == NULL, "list invariant"); 295 assert(tail() == NULL || tail()->next() == NULL, "list invariant");
296 296
297 Chunk_t* fc = tail(); 297 Chunk_t* fc = tail();
298 fc->link_after(chunk); 298 fc->link_after(chunk);
299 link_tail(chunk); 299 this->link_tail(chunk);
300 300
301 assert(!tail() || size() == tail()->size(), "Wrong sized chunk in list"); 301 assert(!tail() || size() == tail()->size(), "Wrong sized chunk in list");
302 FreeList_t<Chunk_t>::increment_count(); 302 FreeList_t<Chunk_t>::increment_count();
303 debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));) 303 debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));)
304 assert(head() == NULL || head()->prev() == NULL, "list invariant"); 304 assert(head() == NULL || head()->prev() == NULL, "list invariant");
321 Chunk_t* fc = head()->next(); 321 Chunk_t* fc = head()->next();
322 if (fc != NULL) { 322 if (fc != NULL) {
323 chunk->link_after(fc); 323 chunk->link_after(fc);
324 } else { 324 } else {
325 assert(tail() == NULL, "List is inconsistent"); 325 assert(tail() == NULL, "List is inconsistent");
326 link_tail(chunk); 326 this->link_tail(chunk);
327 } 327 }
328 head()->link_after(chunk); 328 head()->link_after(chunk);
329 assert(!head() || size() == head()->size(), "Wrong sized chunk in list"); 329 assert(!head() || size() == head()->size(), "Wrong sized chunk in list");
330 FreeList_t<Chunk_t>::increment_count(); 330 FreeList_t<Chunk_t>::increment_count();
331 debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));) 331 debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));)
938 class AscendTreeCensusClosure : public TreeCensusClosure<Chunk_t, FreeList_t> { 938 class AscendTreeCensusClosure : public TreeCensusClosure<Chunk_t, FreeList_t> {
939 public: 939 public:
940 void do_tree(TreeList<Chunk_t, FreeList_t>* tl) { 940 void do_tree(TreeList<Chunk_t, FreeList_t>* tl) {
941 if (tl != NULL) { 941 if (tl != NULL) {
942 do_tree(tl->left()); 942 do_tree(tl->left());
943 do_list(tl); 943 this->do_list(tl);
944 do_tree(tl->right()); 944 do_tree(tl->right());
945 } 945 }
946 } 946 }
947 }; 947 };
948 948
950 class DescendTreeCensusClosure : public TreeCensusClosure<Chunk_t, FreeList_t> { 950 class DescendTreeCensusClosure : public TreeCensusClosure<Chunk_t, FreeList_t> {
951 public: 951 public:
952 void do_tree(TreeList<Chunk_t, FreeList_t>* tl) { 952 void do_tree(TreeList<Chunk_t, FreeList_t>* tl) {
953 if (tl != NULL) { 953 if (tl != NULL) {
954 do_tree(tl->right()); 954 do_tree(tl->right());
955 do_list(tl); 955 this->do_list(tl);
956 do_tree(tl->left()); 956 do_tree(tl->left());
957 } 957 }
958 } 958 }
959 }; 959 };
960 960
1020 class DescendTreeSearchClosure : public TreeSearchClosure<Chunk_t, FreeList_t> { 1020 class DescendTreeSearchClosure : public TreeSearchClosure<Chunk_t, FreeList_t> {
1021 public: 1021 public:
1022 bool do_tree(TreeList<Chunk_t, FreeList_t>* tl) { 1022 bool do_tree(TreeList<Chunk_t, FreeList_t>* tl) {
1023 if (tl != NULL) { 1023 if (tl != NULL) {
1024 if (do_tree(tl->right())) return true; 1024 if (do_tree(tl->right())) return true;
1025 if (do_list(tl)) return true; 1025 if (this->do_list(tl)) return true;
1026 if (do_tree(tl->left())) return true; 1026 if (do_tree(tl->left())) return true;
1027 } 1027 }
1028 return false; 1028 return false;
1029 } 1029 }
1030 }; 1030 };

mercurial