101 next_vsl = vsl->next(); |
101 next_vsl = vsl->next(); |
102 // Don't free the current virtual space since it will likely |
102 // Don't free the current virtual space since it will likely |
103 // be needed soon. |
103 // be needed soon. |
104 if (vsl->container_count() == 0 && vsl != current_virtual_space()) { |
104 if (vsl->container_count() == 0 && vsl != current_virtual_space()) { |
105 log_trace(gc, metaspace, freelist)("Purging VirtualSpaceNode " PTR_FORMAT " (capacity: " SIZE_FORMAT |
105 log_trace(gc, metaspace, freelist)("Purging VirtualSpaceNode " PTR_FORMAT " (capacity: " SIZE_FORMAT |
106 ", used: " SIZE_FORMAT ").", p2i(vsl), vsl->capacity_words_in_vs(), vsl->used_words_in_vs()); |
106 ", used: " SIZE_FORMAT ").", p2i(vsl), vsl->committed_words(), vsl->used_words()); |
107 DEBUG_ONLY(Atomic::inc(&g_internal_statistics.num_vsnodes_purged)); |
107 DEBUG_ONLY(Atomic::inc(&g_internal_statistics.num_vsnodes_purged)); |
108 // Unlink it from the list |
108 // Unlink it from the list |
109 if (prev_vsl == vsl) { |
109 if (prev_vsl == vsl) { |
110 // This is the case of the current node being the first node. |
110 // This is the case of the current node being the first node. |
111 assert(vsl == virtual_space_list(), "Expected to be the first node"); |
111 assert(vsl == virtual_space_list(), "Expected to be the first node"); |