1879N/A * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A // Values returned by the iterate() methods. 0N/A // Atomically mark an object as live. 0N/A // Return whether the specified begin or end bit is set. 0N/A // Traditional interface for testing whether an object is marked or not (these 0N/A // test only the begin bits). 0N/A // Convert sizes from bits to HeapWords and back. An object that is n bits 0N/A // long will be bits_to_words(n) words long. An object that is m words long 0N/A // will take up words_to_bits(m) bits in the bitmap. 0N/A // Return the size in words of an object given a begin bit and an end bit, or 0N/A // the equivalent beg_addr and end_addr. 0N/A // Return the size in words of the object (a search is done for the end bit). 0N/A // Synonyms for the above. 0N/A // Apply live_closure to each live object that lies completely within the 0N/A // range [live_range_beg, live_range_end). This is used to iterate over the 0N/A // compacted region of the heap. Return values: 0N/A // incomplete The iteration is not complete. The last object that 0N/A // begins in the range does not end in the range; 0N/A // closure->source() is set to the start of that object. 0N/A // complete The iteration is complete. All objects in the range 0N/A // were processed and the closure is not full; 0N/A // closure->source() is set one past the end of the range. 0N/A // full The closure is full; closure->source() is set to one 0N/A // past the end of the last object processed. 0N/A // would_overflow The next object in the range would overflow the closure; 0N/A // closure->source() is set to the start of that object. 0N/A // Apply live closure as above and additionally apply dead_closure to all dead 0N/A // space in the range [range_beg, dead_range_end). Note that dead_range_end 0N/A // must be >= range_end. This is used to iterate over the dense prefix. 0N/A // This method assumes that if the first bit in the range (range_beg) is not 0N/A // marked, then dead space begins at that point and the dead_closure is 0N/A // applied. Thus callers must ensure that range_beg is not in the middle of a 0N/A // Return the number of live words in the range [beg_addr, end_addr) due to 0N/A // objects that start in the range. If a live object extends onto the range, 0N/A // the caller must detect and account for any live words due to that object. 0N/A // If a live object extends beyond the end of the range, only the words within 0N/A // the range are included in the result. 0N/A // Same as the above, except the end of the range must be a live object, which 0N/A // is the case when updating pointers. This allows a branch to be removed 0N/A // from inside the loop. 0N/A // Convert a heap address to/from a bit index. 0N/A // Return the bit index of the first marked object that begins (or ends, 0N/A // respectively) in the range [beg, end). If no object is found, return end. 0N/A // Clear a range of bits or the entire bitmap (both begin and end bits are 0N/A // Return the number of bits required to represent the specified number of 0N/A // HeapWords, or the specified region. 0N/A#
endif // #ifndef PRODUCT 0N/A#
endif // #ifdef ASSERT 0N/A // Each bit in the bitmap represents one unit of 'object granularity.' Objects 0N/A // are double-word aligned in 32-bit VMs, but not in 64-bit VMs, so the 32-bit 0N/A // granularity is 2, 64-bit is 1. 0N/A#
endif // #ifndef PRODUCT 0N/A // Need two bits (one begin bit, one end bit) for each unit of 'object 0N/A // granularity' in the heap. 0N/A // Allow one past the last valid bit; useful for loop bounds. 0N/A // Allow one past the last valid address; useful for loop bounds. 0N/A#
endif // #ifdef ASSERT 1879N/A#
endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PARMARKBITMAP_HPP