src/share/vm/runtime/handles.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8026328 Sdiff src/share/vm/runtime

src/share/vm/runtime/handles.cpp

Print this page




  28 #include "oops/oop.inline.hpp"
  29 #include "runtime/handles.inline.hpp"
  30 #include "runtime/thread.inline.hpp"
  31 #ifdef TARGET_OS_FAMILY_linux
  32 # include "os_linux.inline.hpp"
  33 #endif
  34 #ifdef TARGET_OS_FAMILY_solaris
  35 # include "os_solaris.inline.hpp"
  36 #endif
  37 #ifdef TARGET_OS_FAMILY_windows
  38 # include "os_windows.inline.hpp"
  39 #endif
  40 #ifdef TARGET_OS_FAMILY_bsd
  41 # include "os_bsd.inline.hpp"
  42 #endif
  43 
  44 #ifdef ASSERT
  45 oop* HandleArea::allocate_handle(oop obj) {
  46   assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark");
  47   assert(_no_handle_mark_nesting == 0, "allocating handle inside NoHandleMark");
  48   assert(obj->is_oop(), "sanity check");
  49   return real_allocate_handle(obj);
  50 }
  51 
  52 Handle::Handle(Thread* thread, oop obj) {
  53   assert(thread == Thread::current(), "sanity check");
  54   if (obj == NULL) {
  55     _handle = NULL;
  56   } else {
  57     _handle = thread->handle_area()->allocate_handle(obj);
  58   }
  59 }
  60 
  61 #endif
  62 
  63 static uintx chunk_oops_do(OopClosure* f, Chunk* chunk, char* chunk_top) {
  64   oop* bottom = (oop*) chunk->bottom();
  65   oop* top    = (oop*) chunk_top;
  66   uintx handles_visited = top - bottom;
  67   assert(top >= bottom && top <= (oop*) chunk->top(), "just checking");
  68   // during GC phase 3, a handle may be a forward pointer that




  28 #include "oops/oop.inline.hpp"
  29 #include "runtime/handles.inline.hpp"
  30 #include "runtime/thread.inline.hpp"
  31 #ifdef TARGET_OS_FAMILY_linux
  32 # include "os_linux.inline.hpp"
  33 #endif
  34 #ifdef TARGET_OS_FAMILY_solaris
  35 # include "os_solaris.inline.hpp"
  36 #endif
  37 #ifdef TARGET_OS_FAMILY_windows
  38 # include "os_windows.inline.hpp"
  39 #endif
  40 #ifdef TARGET_OS_FAMILY_bsd
  41 # include "os_bsd.inline.hpp"
  42 #endif
  43 
  44 #ifdef ASSERT
  45 oop* HandleArea::allocate_handle(oop obj) {
  46   assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark");
  47   assert(_no_handle_mark_nesting == 0, "allocating handle inside NoHandleMark");
  48   assert(obj->is_oop(), err_msg("not an oop: " INTPTR_FORMAT, (intptr_t*) obj));
  49   return real_allocate_handle(obj);
  50 }
  51 
  52 Handle::Handle(Thread* thread, oop obj) {
  53   assert(thread == Thread::current(), "sanity check");
  54   if (obj == NULL) {
  55     _handle = NULL;
  56   } else {
  57     _handle = thread->handle_area()->allocate_handle(obj);
  58   }
  59 }
  60 
  61 #endif
  62 
  63 static uintx chunk_oops_do(OopClosure* f, Chunk* chunk, char* chunk_top) {
  64   oop* bottom = (oop*) chunk->bottom();
  65   oop* top    = (oop*) chunk_top;
  66   uintx handles_visited = top - bottom;
  67   assert(top >= bottom && top <= (oop*) chunk->top(), "just checking");
  68   // during GC phase 3, a handle may be a forward pointer that


src/share/vm/runtime/handles.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File