src/hotspot/share/gc/shared/blockOffsetTable.inline.hpp
changeset 59053 ba6c248cae19
parent 53244 9807daeb47c4
equal deleted inserted replaced
59051:f0312c7d5b37 59053:ba6c248cae19
    68            Thread::current()->is_ConcurrentGC_thread() ||
    68            Thread::current()->is_ConcurrentGC_thread() ||
    69            ((!Thread::current()->is_ConcurrentGC_thread()) &&
    69            ((!Thread::current()->is_ConcurrentGC_thread()) &&
    70             ParGCRareEvent_lock->owned_by_self()), "Crack");
    70             ParGCRareEvent_lock->owned_by_self()), "Crack");
    71 }
    71 }
    72 
    72 
    73 //////////////////////////////////////////////////////////////////////////
       
    74 // BlockOffsetArrayNonContigSpace inlines
       
    75 //////////////////////////////////////////////////////////////////////////
       
    76 inline void BlockOffsetArrayNonContigSpace::freed(HeapWord* blk,
       
    77                                                   size_t size) {
       
    78   freed(blk, blk + size);
       
    79 }
       
    80 
       
    81 inline void BlockOffsetArrayNonContigSpace::freed(HeapWord* blk_start,
       
    82                                                   HeapWord* blk_end) {
       
    83   // Verify that the BOT shows [blk_start, blk_end) to be one block.
       
    84   verify_single_block(blk_start, blk_end);
       
    85   // adjust _unallocated_block upward or downward
       
    86   // as appropriate
       
    87   if (BlockOffsetArrayUseUnallocatedBlock) {
       
    88     assert(_unallocated_block <= _end,
       
    89            "Inconsistent value for _unallocated_block");
       
    90     if (blk_end >= _unallocated_block && blk_start <= _unallocated_block) {
       
    91       // CMS-specific note: a block abutting _unallocated_block to
       
    92       // its left is being freed, a new block is being added or
       
    93       // we are resetting following a compaction
       
    94       _unallocated_block = blk_start;
       
    95     }
       
    96   }
       
    97 }
       
    98 
       
    99 #endif // SHARE_GC_SHARED_BLOCKOFFSETTABLE_INLINE_HPP
    73 #endif // SHARE_GC_SHARED_BLOCKOFFSETTABLE_INLINE_HPP