Print this page

        

*** 1833,1843 **** void CompactibleFreeListSpace::object_iterate_since_last_GC(ObjectClosure* cl) { // ugghh... how would one do this efficiently for a non-contiguous space? guarantee(false, "NYI"); } ! bool CompactibleFreeListSpace::linearAllocationWouldFail() { return _smallLinearAllocBlock._word_size == 0; } void CompactibleFreeListSpace::repairLinearAllocationBlocks() { // Fix up linear allocation blocks to look like free blocks --- 1833,1843 ---- void CompactibleFreeListSpace::object_iterate_since_last_GC(ObjectClosure* cl) { // ugghh... how would one do this efficiently for a non-contiguous space? guarantee(false, "NYI"); } ! bool CompactibleFreeListSpace::linearAllocationWouldFail() const { return _smallLinearAllocBlock._word_size == 0; } void CompactibleFreeListSpace::repairLinearAllocationBlocks() { // Fix up linear allocation blocks to look like free blocks
*** 1904,1913 **** --- 1904,1920 ---- blk->_word_size = fc->size(); fc->dontCoalesce(); // to prevent sweeper from sweeping us up } } + // Support for concurrent collection policy decisions. + bool CompactibleFreeListSpace::should_concurrent_collect() const { + // In the future we might want to add in frgamentation stats -- + // including erosion of the "mountain" into this decision as well. + return !adaptive_freelists() && linearAllocationWouldFail(); + } + // Support for compaction void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) { SCAN_AND_FORWARD(cp,end,block_is_obj,block_size); // prepare_for_compaction() uses the space between live objects