Lines Matching refs:tc
62 TreeList<Chunk>* TreeList<Chunk>::as_TreeList(TreeChunk<Chunk>* tc) {
64 assert(tc->size() >= BinaryTreeDictionary<Chunk>::min_tree_chunk_size, "Chunk is too small for a TreeChunk");
65 TreeList<Chunk>* tl = tc->embedded_list();
66 tc->set_list(tl);
71 tl->set_size(tc->size());
72 tl->link_head(tc);
73 tl->link_tail(tc);
84 TreeChunk<Chunk>* tc = (TreeChunk<Chunk>*) addr;
90 SpaceMangler::is_mangled((HeapWord*) tc->size_addr()) &&
91 SpaceMangler::is_mangled((HeapWord*) tc->prev_addr()) &&
92 SpaceMangler::is_mangled((HeapWord*) tc->next_addr())) ||
93 (tc->size() == 0 && tc->prev() == NULL && tc->next() == NULL),
95 tc->set_size(size);
96 tc->link_prev(NULL);
97 tc->link_next(NULL);
98 TreeList<Chunk>* tl = TreeList<Chunk>::as_TreeList(tc);
103 TreeList<Chunk>* TreeList<Chunk>::remove_chunk_replace_if_needed(TreeChunk<Chunk>* tc) {
108 assert(tc != NULL, "Chunk being removed is NULL");
111 assert(tc->is_free(), "Header is not marked correctly");
115 Chunk* prevFC = tc->prev();
116 TreeChunk<Chunk>* nextTC = TreeChunk<Chunk>::as_TreeChunk(tc->next());
120 if (tc == list) {
138 nextTC->set_embedded_list(tc->embedded_list());
186 tc->link_prev(NULL);
187 tc->link_next(NULL);
188 tc->set_list(NULL);
193 assert(curFC != tc, "Chunk is still in list");
210 assert(tc->is_free(), "Should still be a free chunk");
488 bool BinaryTreeDictionary<Chunk>::verify_chunk_in_free_list(Chunk* tc) const {
489 size_t size = tc->size();
494 return tl->verify_chunk_in_free_list(tc);
515 BinaryTreeDictionary<Chunk>::remove_chunk_from_tree(TreeChunk<Chunk>* tc) {
516 assert(tc != NULL, "Should not call with a NULL chunk");
517 assert(tc->is_free(), "Header is not marked correctly");
521 TreeList<Chunk>* tl = tc->list();
527 assert(_root->head() == tc, "Should only be this one chunk");
539 retTC = tc;
542 TreeList<Chunk>* replacementTL = tl->remove_chunk_replace_if_needed(tc);
543 assert(tc->is_free(), "Chunk should still be free");
560 assert(replacementTL->size() == tc->size(), "Broken size");
697 void BinaryTreeDictionary<Chunk>::semi_splay_step(TreeList<Chunk>* tc) {
702 if (root() == tc) return;
732 TreeChunk<Chunk>* tc = TreeChunk<Chunk>::as_TreeChunk(fc);
735 tc->initialize();
737 tc->set_list(curTL);
738 curTL->return_chunk_at_tail(tc);
740 tc->clear_next();
741 tc->link_prev(NULL);
742 TreeList<Chunk>* newTL = TreeList<Chunk>::as_TreeList(tc);
743 assert(((TreeChunk<Chunk>*)tc)->list() == newTL,
758 assert(tc->list() != NULL, "Tree list should be set");
774 TreeList<Chunk>* tc = root();
775 if (tc == NULL) return 0;
776 for (; tc->right() != NULL; tc = tc->right());
777 return tc->size();
786 Chunk* tc = tl->head();
787 for (cnt = 0; tc != NULL; tc = tc->next(), cnt++);