< prev index next >

src/hotspot/share/gc/shared/locationPrinter.cpp

Print this page

        

@@ -22,25 +22,25 @@
  *
  */
 
 #include "precompiled.hpp"
 #include "gc/shared/collectedHeap.hpp"
-#include "gc/shared/locationPrinter.inline.hpp"
+#include "gc/shared/locationPrinter.hpp"
 #include "memory/universe.hpp"
+#include "runtime/os.hpp"
 #include "oops/klass.hpp"
 
-bool LocationPrinter::is_valid_obj(address addr) {
-  void* obj = reinterpret_cast<void*>(addr);
+bool LocationPrinter::is_valid_obj(void* obj) {
   if (!is_object_aligned(obj)) {
     return false;
   }
-  if ((size_t)obj < os::min_page_size()) {
+  if (obj < (void*)os::min_page_size()) {
     return false;
   }
 
   // We need at least the mark and the klass word in the committed region.
-  if (!os::is_readable_range(obj, (oopDesc*)obj + 1)) {
+  if (!os::is_readable_range(obj, (HeapWord*)obj + oopDesc::header_size())) {
     return false;
   }
   if (!Universe::heap()->is_in(obj)) {
     return false;
   }
< prev index next >