--- a/src/hotspot/share/memory/metaspace.cpp Mon Apr 23 11:25:53 2018 +0200
+++ b/src/hotspot/share/memory/metaspace.cpp Mon Apr 23 16:25:16 2018 +0200
@@ -3378,6 +3378,7 @@
}
MetaWord* SpaceManager::grow_and_allocate(size_t word_size) {
+ assert_lock_strong(_lock);
assert(vs_list()->current_virtual_space() != NULL,
"Should have been set");
assert(current_chunk() == NULL ||
@@ -3553,6 +3554,7 @@
// Adds a chunk to the list of chunks in use.
void SpaceManager::add_chunk(Metachunk* new_chunk, bool make_current) {
+ assert_lock_strong(_lock);
assert(new_chunk != NULL, "Should not be NULL");
assert(new_chunk->next() == NULL, "Should not be on a list");