mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +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
|
@ -172,6 +172,22 @@ bool CollectedHeap::request_concurrent_phase(const char* phase) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool CollectedHeap::is_oop(oop object) const {
|
||||
if (!check_obj_alignment(object)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_in_reserved(object)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_in_reserved(object->klass_or_null())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Memory state functions.
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue