< prev index next >
src/hotspot/share/memory/metaspace/chunkManager.cpp
Print this page
rev 53600 : imported patch autouncommit-metachunks
*** 349,358 ****
--- 349,362 ----
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);
*** 510,519 ****
--- 514,527 ----
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();
*** 616,625 ****
--- 624,637 ----
}
}
}
}
+ if (AutoUncommitMetaChunks) {
+ chunk->uncommit();
+ }
+
}
void ChunkManager::return_chunk_list(Metachunk* chunks) {
if (chunks == NULL) {
return;
< prev index next >