src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp

Print this page




 125     _prev = NULL;
 126 #ifdef _LP64
 127     if (UseCompressedOops) {
 128       OrderAccess::storestore();
 129       set_mark(markOopDesc::prototype());
 130     }
 131 #endif
 132     assert(!is_free(), "Error");
 133   }
 134 
 135   // Return the address past the end of this chunk
 136   uintptr_t* end() const { return ((uintptr_t*) this) + size(); }
 137 
 138   // debugging
 139   void verify()             const PRODUCT_RETURN;
 140   void verifyList()         const PRODUCT_RETURN;
 141   void mangleAllocated(size_t size) PRODUCT_RETURN;
 142   void mangleFreed(size_t size)     PRODUCT_RETURN;
 143 
 144   void print_on(outputStream* st);










 145 };
 146 
 147 extern size_t MinChunkSize;
 148 
 149 
 150 #endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_FREECHUNK_HPP


 125     _prev = NULL;
 126 #ifdef _LP64
 127     if (UseCompressedOops) {
 128       OrderAccess::storestore();
 129       set_mark(markOopDesc::prototype());
 130     }
 131 #endif
 132     assert(!is_free(), "Error");
 133   }
 134 
 135   // Return the address past the end of this chunk
 136   uintptr_t* end() const { return ((uintptr_t*) this) + size(); }
 137 
 138   // debugging
 139   void verify()             const PRODUCT_RETURN;
 140   void verifyList()         const PRODUCT_RETURN;
 141   void mangleAllocated(size_t size) PRODUCT_RETURN;
 142   void mangleFreed(size_t size)     PRODUCT_RETURN;
 143 
 144   void print_on(outputStream* st);
 145 
 146   // Deallocate the in-RAM pages.
 147   void deallocate_pages() {
 148     // We have to exclude the FreeChunk (the header of a free chunk)
 149     // from page deallocation because they contain metadata such as
 150     // linked list pointers.
 151     address start = ((address) this) + sizeof(FreeChunk);
 152     size_t size_in_bytes = size() * HeapWordSize - sizeof(FreeChunk);
 153     os::deallocate_pages(start, size_in_bytes);
 154   }
 155 };
 156 
 157 extern size_t MinChunkSize;
 158 
 159 
 160 #endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_FREECHUNK_HPP