< prev index next >

src/hotspot/share/memory/metaspace/metachunk.cpp

Print this page
rev 50068 : [mq]: metaspace-split

*** 22,37 **** * */ #include "precompiled.hpp" #include "memory/allocation.hpp" ! #include "memory/metachunk.hpp" #include "utilities/align.hpp" #include "utilities/copy.hpp" #include "utilities/debug.hpp" ! class VirtualSpaceNode; size_t Metachunk::object_alignment() { // Must align pointers and sizes to 8, // so that 64 bit types get correctly aligned. const size_t alignment = 8; --- 22,40 ---- * */ #include "precompiled.hpp" #include "memory/allocation.hpp" ! #include "memory/metaspace/metachunk.hpp" ! #include "memory/metaspace/occupancyMap.hpp" ! #include "memory/metaspace/virtualSpaceNode.hpp" #include "utilities/align.hpp" #include "utilities/copy.hpp" #include "utilities/debug.hpp" ! namespace metaspace { ! namespace internals { size_t Metachunk::object_alignment() { // Must align pointers and sizes to 8, // so that 64 bit types get correctly aligned. const size_t alignment = 8;
*** 145,149 **** --- 148,173 ---- return "humongous"; default: return "Invalid index"; } } + + #ifdef ASSERT + void do_verify_chunk(Metachunk* chunk) { + guarantee(chunk != NULL, "Sanity"); + // Verify chunk itself; then verify that it is consistent with the + // occupany map of its containing node. + chunk->verify(); + VirtualSpaceNode* const vsn = chunk->container(); + OccupancyMap* const ocmap = vsn->occupancy_map(); + ocmap->verify_for_chunk(chunk); + } + #endif + + void do_update_in_use_info_for_chunk(Metachunk* chunk, bool inuse) { + chunk->set_is_tagged_free(!inuse); + OccupancyMap* const ocmap = chunk->container()->occupancy_map(); + ocmap->set_region_in_use((MetaWord*)chunk, chunk->word_size(), inuse); + } + + } // namespace metaspace + } // namespace internals
< prev index next >