< prev index next >

src/hotspot/share/gc/z/zCollectedHeap.cpp

Print this page




  92 
  93 size_t ZCollectedHeap::capacity() const {
  94   return _heap.capacity();
  95 }
  96 
  97 size_t ZCollectedHeap::used() const {
  98   return _heap.used();
  99 }
 100 
 101 size_t ZCollectedHeap::unused() const {
 102   return _heap.unused();
 103 }
 104 
 105 bool ZCollectedHeap::is_maximal_no_gc() const {
 106   // Not supported
 107   ShouldNotReachHere();
 108   return false;
 109 }
 110 
 111 bool ZCollectedHeap::is_in(const void* p) const {
 112   return _heap.is_in((uintptr_t)p);
 113 }
 114 
 115 uint32_t ZCollectedHeap::hash_oop(oop obj) const {
 116   return _heap.hash_oop(obj);
 117 }
 118 
 119 HeapWord* ZCollectedHeap::allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size) {
 120   const size_t size_in_bytes = ZUtils::words_to_bytes(align_object_size(requested_size));
 121   const uintptr_t addr = _heap.alloc_tlab(size_in_bytes);
 122 
 123   if (addr != 0) {
 124     *actual_size = requested_size;
 125   }
 126 
 127   return (HeapWord*)addr;
 128 }
 129 
 130 HeapWord* ZCollectedHeap::mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded) {
 131   const size_t size_in_bytes = ZUtils::words_to_bytes(align_object_size(size));
 132   return (HeapWord*)_heap.alloc_object(size_in_bytes);




  92 
  93 size_t ZCollectedHeap::capacity() const {
  94   return _heap.capacity();
  95 }
  96 
  97 size_t ZCollectedHeap::used() const {
  98   return _heap.used();
  99 }
 100 
 101 size_t ZCollectedHeap::unused() const {
 102   return _heap.unused();
 103 }
 104 
 105 bool ZCollectedHeap::is_maximal_no_gc() const {
 106   // Not supported
 107   ShouldNotReachHere();
 108   return false;
 109 }
 110 
 111 bool ZCollectedHeap::is_in(const void* p) const {
 112   return is_in_reserved(p) && _heap.is_in((uintptr_t)p);
 113 }
 114 
 115 uint32_t ZCollectedHeap::hash_oop(oop obj) const {
 116   return _heap.hash_oop(obj);
 117 }
 118 
 119 HeapWord* ZCollectedHeap::allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size) {
 120   const size_t size_in_bytes = ZUtils::words_to_bytes(align_object_size(requested_size));
 121   const uintptr_t addr = _heap.alloc_tlab(size_in_bytes);
 122 
 123   if (addr != 0) {
 124     *actual_size = requested_size;
 125   }
 126 
 127   return (HeapWord*)addr;
 128 }
 129 
 130 HeapWord* ZCollectedHeap::mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded) {
 131   const size_t size_in_bytes = ZUtils::words_to_bytes(align_object_size(size));
 132   return (HeapWord*)_heap.alloc_object(size_in_bytes);


< prev index next >