< prev index next >

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

Print this page
rev 54012 : imported patch autouncommit-metachunks

*** 301,310 **** --- 301,314 ---- const size_t region_word_len = larger_chunk->word_size(); MetaWord* const region_end = region_start + region_word_len; VirtualSpaceNode* const vsn = larger_chunk->container(); OccupancyMap* const ocmap = vsn->occupancy_map(); + if (AutoUncommitMetaChunks) { + larger_chunk->commit(); + } + // Any larger non-humongous chunk size is a multiple of any smaller chunk size. // Since non-humongous chunks are aligned to their chunk size, the larger chunk should start // at an address suitable to place the smaller target chunk. assert_is_aligned(region_start, target_chunk_word_size);
*** 466,475 **** --- 470,483 ---- log_trace(gc, metaspace, alloc)("Free list allocate humongous chunk size " SIZE_FORMAT " for requested size " SIZE_FORMAT " waste " SIZE_FORMAT, chunk->word_size(), word_size, chunk->word_size() - word_size); } + if (AutoUncommitMetaChunks) { + chunk->commit(); + } + // Chunk has been removed from the chunk manager; update counters. account_for_removed_chunk(chunk); do_update_in_use_info_for_chunk(chunk, true); chunk->container()->inc_container_count(); chunk->inc_use_count();
*** 597,606 **** --- 605,618 ---- vsn->verify(true); vsn->verify_free_chunks_are_ideally_merged(); END_EVERY_NTH #endif + if (AutoUncommitMetaChunks) { + chunk->uncommit(); + } + } void ChunkManager::return_chunk_list(Metachunk* chunks) { if (chunks == NULL) { return;
< prev index next >