Lines Matching refs:fc
125 FreeChunk* fc = _dictionary->get_chunk(mr.word_size());
128 HeapWord* addr = (HeapWord*) fc;
129 _smallLinearAllocBlock.set(addr, fc->size() ,
130 1024*SmallForLinearAlloc, fc->size());
280 FreeChunk* fc = (FreeChunk*) mr.start();
281 fc->set_size(mr.word_size());
283 returnChunkToDictionary(fc);
285 _bt.verify_not_unallocated((HeapWord*)fc, fc->size());
286 _indexedFreeList[mr.word_size()].return_chunk_at_head(fc);
305 FreeChunk* fc = dictionary()->find_largest_dict();
306 if (fc != NULL) {
307 assert(fc->size() == mr.word_size(),
309 removeChunkFromDictionary(fc);
310 HeapWord* addr = (HeapWord*) fc;
311 _smallLinearAllocBlock.set(addr, fc->size() ,
312 1024*SmallForLinearAlloc, fc->size());
349 for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL;
350 fc = fc->next()) {
372 FreeChunk* fc = (FreeChunk*) p;
373 return fc->is_free();
460 for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL;
461 fc = fc->next()) {
463 fc, (HeapWord*)fc + i,
464 fc->cantCoalesce() ? "\t CC" : "");
582 for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL;
583 fc = fc->next()) {
823 FreeChunk* fc = (FreeChunk*)obj_addr;
824 obj_addr += fc->size();
919 FreeChunk* fc = (FreeChunk*)addr;
920 if (fc->is_free()) {
924 size = fc->size();
961 FreeChunk* fc = (FreeChunk*)addr;
962 if (fc->is_free()) {
966 size = fc->size();
1000 volatile FreeChunk* fc = (volatile FreeChunk*)p;
1001 size_t res = fc->size();
1043 volatile FreeChunk* fc = (volatile FreeChunk*)p;
1044 size_t res = fc->size();
1077 FreeChunk* fc = (FreeChunk*)p;
1078 if (fc->is_free()) {
1079 return fc->size();
1093 FreeChunk* fc = (FreeChunk*)p;
1166 FreeChunk* fc = (FreeChunk*)p;
1169 if (!fc->is_free()) {
1189 for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL;
1190 fc = fc->next()) {
1229 FreeChunk* fc = (FreeChunk*)res;
1230 fc->markNotFree();
1231 assert(!fc->is_free(), "shouldn't be marked free");
1232 assert(oop(fc)->klass_or_null() == NULL, "should look uninitialized");
1238 debug_only(fc->mangleAllocated(size));
1371 bool CompactibleFreeListSpace::verifyChunkInIndexedFreeLists(FreeChunk* fc) const {
1372 assert(fc->size() < IndexSetSize, "Size of chunk is too large");
1373 return _indexedFreeList[fc->size()].verify_chunk_in_free_list(fc);
1376 bool CompactibleFreeListSpace::verify_chunk_is_linear_alloc_block(FreeChunk* fc) const {
1377 assert((_smallLinearAllocBlock._ptr != (HeapWord*)fc) ||
1378 (_smallLinearAllocBlock._word_size == fc->size()),
1380 return ((_smallLinearAllocBlock._ptr == (HeapWord*)fc) &&
1381 (_smallLinearAllocBlock._word_size == fc->size()));
1387 bool CompactibleFreeListSpace::verify_chunk_in_free_list(FreeChunk* fc) const {
1388 if (verify_chunk_is_linear_alloc_block(fc)) {
1390 } else if (fc->size() < IndexSetSize) {
1391 return verifyChunkInIndexedFreeLists(fc);
1393 return dictionary()->verify_chunk_in_free_list(fc);
1410 FreeChunk* fc;
1417 fc = getChunkFromDictionary(size);
1419 if (fc != NULL) {
1420 fc->dontCoalesce();
1421 assert(fc->is_free(), "Should be free, but not coalescable");
1424 _bt.verify_single_block((HeapWord*)fc, fc->size());
1425 _bt.verify_not_unallocated((HeapWord*)fc, fc->size());
1427 return fc;
1579 FreeChunk* fc = NULL;
1585 if (!bestFitFirst() || (fc = bestFitSmall(size)) == NULL) {
1636 _bt.verify_not_unallocated((HeapWord*) fc, size);
1650 fc = curFc;
1653 fc = newFc;
1660 fc = getChunkFromDictionaryExact(size);
1662 // assert(fc == NULL || fc->is_free(), "Should be returning a free chunk");
1663 return fc;
1669 FreeChunk* fc = _dictionary->get_chunk(size);
1670 if (fc == NULL) {
1673 _bt.allocated((HeapWord*)fc, fc->size());
1674 if (fc->size() >= size + MinChunkSize) {
1675 fc = splitChunkAndReturnRemainder(fc, size);
1677 assert(fc->size() >= size, "chunk too small");
1678 assert(fc->size() < size + MinChunkSize, "chunk too big");
1679 _bt.verify_single_block((HeapWord*)fc, fc->size());
1680 return fc;
1686 FreeChunk* fc = _dictionary->get_chunk(size);
1687 if (fc == NULL) {
1688 return fc;
1690 _bt.allocated((HeapWord*)fc, fc->size());
1691 if (fc->size() == size) {
1692 _bt.verify_single_block((HeapWord*)fc, size);
1693 return fc;
1695 assert(fc->size() > size, "get_chunk() guarantee");
1696 if (fc->size() < size + MinChunkSize) {
1698 returnChunkToDictionary(fc);
1699 fc = _dictionary->get_chunk(size + MinChunkSize);
1700 if (fc == NULL) {
1703 _bt.allocated((HeapWord*)fc, fc->size());
1705 assert(fc->size() >= size + MinChunkSize, "tautology");
1706 fc = splitChunkAndReturnRemainder(fc, size);
1707 assert(fc->size() == size, "chunk is wrong size");
1708 _bt.verify_single_block((HeapWord*)fc, size);
1709 return fc;
1729 CompactibleFreeListSpace::returnChunkToFreeList(FreeChunk* fc) {
1731 size_t size = fc->size();
1732 _bt.verify_single_block((HeapWord*) fc, size);
1733 _bt.verify_not_unallocated((HeapWord*) fc, size);
1735 _indexedFreeList[size].return_chunk_at_tail(fc);
1737 _indexedFreeList[size].return_chunk_at_head(fc);
1798 FreeChunk* fc = (FreeChunk*) chunk;
1799 fc->set_size(size);
1800 debug_only(fc->mangleFreed(size));
1802 returnChunkToFreeList(fc);
1804 returnChunkToDictionary(fc);
1823 CompactibleFreeListSpace::removeFreeChunkFromFreeLists(FreeChunk* fc) {
1824 size_t size = fc->size();
1828 removeChunkFromIndexedFreeList(fc);
1830 removeChunkFromDictionary(fc);
1832 _bt.verify_single_block((HeapWord*)fc, size);
1837 CompactibleFreeListSpace::removeChunkFromDictionary(FreeChunk* fc) {
1838 size_t size = fc->size();
1840 assert(fc != NULL, "null chunk");
1841 _bt.verify_single_block((HeapWord*)fc, size);
1842 _dictionary->remove_chunk(fc);
1844 _bt.allocated((HeapWord*)fc, size);
1848 CompactibleFreeListSpace::removeChunkFromIndexedFreeList(FreeChunk* fc) {
1850 size_t size = fc->size();
1851 _bt.verify_single_block((HeapWord*)fc, size);
1857 _indexedFreeList[size].remove_chunk(fc);
2054 FreeChunk* fc = (FreeChunk*)(blk->_ptr);
2055 fc->set_size(blk->_word_size);
2056 fc->link_prev(NULL); // mark as free
2057 fc->dontCoalesce();
2058 assert(fc->is_free(), "just marked it free");
2059 assert(fc->cantCoalesce(), "just marked it uncoalescable");
2095 FreeChunk* fc;
2097 (fc = getChunkFromIndexedFreeList(blk->_refillSize)) != NULL) {
2102 fc = getChunkFromDictionary(blk->_refillSize);
2104 if (fc != NULL) {
2105 blk->_ptr = (HeapWord*)fc;
2106 blk->_word_size = fc->size();
2107 fc->dontCoalesce(); // to prevent sweeper from sweeping us up
2368 FreeChunk* fc = (FreeChunk*)addr;
2369 res = fc->size();
2370 if (FLSVerifyLists && !fc->cantCoalesce()) {
2371 guarantee(_sp->verify_chunk_in_free_list(fc),
2519 FreeChunk* fc = _indexedFreeList[size].head();
2523 guarantee(((size >= IndexSetStart) && (size % IndexSetStride == 0)) || fc == NULL,
2525 for (; fc != NULL; fc = fc->next(), n++) {
2526 guarantee(fc->size() == size, "Size inconsistency");
2527 guarantee(fc->is_free(), "!free?");
2528 guarantee(fc->next() == NULL || fc->next()->prev() == fc, "Broken list");
2529 guarantee((fc->next() == NULL) == (fc == tail), "Incorrect tail");
2801 FreeChunk* fc;
2802 while ((fc = fl_for_cur_sz.get_chunk_at_head()) != NULL) {
2806 size_t fc_size = fc->size();
2807 assert(fc->is_free(), "Error");
2809 FreeChunk* ffc = (FreeChunk*)((HeapWord*)fc + i * word_sz);
2811 ((fc == ffc) && ffc->is_free() &&
2824 _bt.verify_single_block((HeapWord*)fc, fc_size);
2844 FreeChunk* fc = NULL;
2851 fc = dictionary()->get_chunk(MAX2(n * word_sz,
2854 if (fc != NULL) {
2855 _bt.allocated((HeapWord*)fc, fc->size(), true /* reducing */); // update _unallocated_blk
2856 dictionary()->dict_census_udpate(fc->size(),
2864 if (fc == NULL) return;
2867 assert(fc->is_free(), "Error: should be a free block");
2868 _bt.verify_single_block((HeapWord*)fc, fc->size());
2869 const size_t nn = fc->size() / word_sz;
2872 rem = fc->size() - n * word_sz;
2880 // If n is 0, the chunk fc that was found is not large
2882 // allocate even one block. Return fc to the
2885 returnChunkToDictionary(fc);
2897 rem_fc = (FreeChunk*)((HeapWord*)fc + prefix_size);
2902 assert((ssize_t)n > 0 && prefix_size > 0 && rem_fc > fc, "Error");
2904 _bt.split_block((HeapWord*)fc, fc->size(), prefix_size);
2905 assert(fc->is_free(), "Error");
2906 fc->set_size(prefix_size);
2922 assert((ssize_t)n > 0 && fc != NULL, "Consistency");
2930 FreeChunk* ffc = (FreeChunk*)((HeapWord*)fc + i * word_sz);
2941 _bt.verify_single_block((HeapWord*)fc, fc_size);
2946 assert(fc->is_free() && fc->size() == n*word_sz, "Error: should still be a free block");
2948 fc->set_size(word_sz);
2949 fc->link_prev(NULL); // idempotent wrt free-ness, see assert above
2950 fc->link_next(NULL);
2951 _bt.verify_not_unallocated((HeapWord*)fc, fc->size());
2952 _bt.verify_single_block((HeapWord*)fc, fc->size());
2953 fl->return_chunk_at_head(fc);