/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "gc_implementation/parallelScavenge/psVirtualspace.hpp"
#include "memory/allocation.hpp"
#include "memory/memRegion.hpp"
//
// This class can be used to locate the beginning of an object in the
// covered region.
//
friend class VerifyObjectStartArrayClosure;
private:
public:
enum BlockValueConstants {
};
enum BlockSizeConstants {
};
protected:
// Mapping from address to object start array entry
"out of bounds access to object start array");
"out of bounds result in byte_for");
return result;
}
// Mapping from object start array entry to address of first word
"out of bounds access to object start array");
"out of bounds accessor from card marking array");
return result;
}
// Mapping that includes the derived offset.
// If the block is clean, returns the last address in the covered region.
// If the block is < index 0, returns the start of the covered region.
// We have to do this before the assert
if (p < _raw_base) {
return _covered_region.start();
}
"out of bounds access to object start array");
if (*p == clean_block) {
return _covered_region.end();
}
result += *p;
"out of bounds accessor from card marking array");
return result;
}
public:
// This method is in lieu of a constructor, so that this class can be
// embedded inline in other classes.
void reset();
// When doing MT offsets, we can't assert this.
//assert(offset > *block, "Found backwards allocation");
// tty->print_cr("[%p]", p);
}
// Optimized for finding the first object that crosses into
// a given block. The blocks contain the offset of the last
// object in that block. Scroll backwards by one, and the first
// object hit should be at the beginning of the block
while (scroll_forward > addr) {
}
}
return scroll_forward;
}
if (*block == clean_block)
return false;
return true;
}
// Return true if an object starts in the range of heap addresses.
// If an object starts at an address corresponding to
// "start", the method will return true.
};
#endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_OBJECTSTARTARRAY_HPP