mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8202081: Introduce CollectedHeap::is_oop()
Reviewed-by: eosterlund, rkennke
This commit is contained in:
parent
0bf983846e
commit
04e986f200
3 changed files with 21 additions and 4 deletions
|
@ -122,10 +122,9 @@ unsigned int oopDesc::new_hash(juint seed) {
|
|||
|
||||
// used only for asserts and guarantees
|
||||
bool oopDesc::is_oop(oop obj, bool ignore_mark_word) {
|
||||
if (!check_obj_alignment(obj)) return false;
|
||||
if (!Universe::heap()->is_in_reserved(obj)) return false;
|
||||
// obj is aligned and accessible in heap
|
||||
if (Universe::heap()->is_in_reserved(obj->klass_or_null())) return false;
|
||||
if (!Universe::heap()->is_oop(obj)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Header verification: the mark is typically non-NULL. If we're
|
||||
// at a safepoint, it must not be null.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue