src/hotspot/share/gc/z/zCollectedHeap.cpp
changeset 58178 bb1aaed00341
parent 58015 dd84de796f2c
child 58199 595fcbebaa77
child 58229 722a19a45994
equal deleted inserted replaced
58177:4932dce35882 58178:bb1aaed00341
    33 #include "gc/z/zServiceability.hpp"
    33 #include "gc/z/zServiceability.hpp"
    34 #include "gc/z/zStat.hpp"
    34 #include "gc/z/zStat.hpp"
    35 #include "gc/z/zUtils.inline.hpp"
    35 #include "gc/z/zUtils.inline.hpp"
    36 #include "memory/universe.hpp"
    36 #include "memory/universe.hpp"
    37 #include "runtime/mutexLocker.hpp"
    37 #include "runtime/mutexLocker.hpp"
       
    38 #include "utilities/align.hpp"
    38 
    39 
    39 ZCollectedHeap* ZCollectedHeap::heap() {
    40 ZCollectedHeap* ZCollectedHeap::heap() {
    40   CollectedHeap* heap = Universe::heap();
    41   CollectedHeap* heap = Universe::heap();
    41   assert(heap != NULL, "Uninitialized access to ZCollectedHeap::heap()");
    42   assert(heap != NULL, "Uninitialized access to ZCollectedHeap::heap()");
    42   assert(heap->kind() == CollectedHeap::Z, "Invalid name");
    43   assert(heap->kind() == CollectedHeap::Z, "Invalid name");
   367 bool ZCollectedHeap::is_oop(oop object) const {
   368 bool ZCollectedHeap::is_oop(oop object) const {
   368   return CollectedHeap::is_oop(object) && _heap.is_oop(object);
   369   return CollectedHeap::is_oop(object) && _heap.is_oop(object);
   369 }
   370 }
   370 
   371 
   371 void ZCollectedHeap::check_oop_location(void* addr) const {
   372 void ZCollectedHeap::check_oop_location(void* addr) const {
   372   assert(check_obj_alignment(addr), "address is not aligned");
   373   assert(is_object_aligned(addr), "address is not aligned");
   373 
   374 
   374   const uintptr_t addr_int = reinterpret_cast<uintptr_t>(addr);
   375   const uintptr_t addr_int = reinterpret_cast<uintptr_t>(addr);
   375   assert(addr_int >= ZAddressSpaceStart, "address is outside of the heap");
   376   assert(addr_int >= ZAddressSpaceStart, "address is outside of the heap");
   376   assert(addr_int < ZAddressSpaceEnd,    "address is outside of the heap");
   377   assert(addr_int < ZAddressSpaceEnd,    "address is outside of the heap");
   377 }
   378 }