equal
deleted
inserted
replaced
3376 MemoryService::track_metaspace_memory_usage(); |
3376 MemoryService::track_metaspace_memory_usage(); |
3377 } |
3377 } |
3378 } |
3378 } |
3379 |
3379 |
3380 MetaWord* SpaceManager::grow_and_allocate(size_t word_size) { |
3380 MetaWord* SpaceManager::grow_and_allocate(size_t word_size) { |
|
3381 assert_lock_strong(_lock); |
3381 assert(vs_list()->current_virtual_space() != NULL, |
3382 assert(vs_list()->current_virtual_space() != NULL, |
3382 "Should have been set"); |
3383 "Should have been set"); |
3383 assert(current_chunk() == NULL || |
3384 assert(current_chunk() == NULL || |
3384 current_chunk()->allocate(word_size) == NULL, |
3385 current_chunk()->allocate(word_size) == NULL, |
3385 "Don't need to expand"); |
3386 "Don't need to expand"); |
3551 } |
3552 } |
3552 |
3553 |
3553 // Adds a chunk to the list of chunks in use. |
3554 // Adds a chunk to the list of chunks in use. |
3554 void SpaceManager::add_chunk(Metachunk* new_chunk, bool make_current) { |
3555 void SpaceManager::add_chunk(Metachunk* new_chunk, bool make_current) { |
3555 |
3556 |
|
3557 assert_lock_strong(_lock); |
3556 assert(new_chunk != NULL, "Should not be NULL"); |
3558 assert(new_chunk != NULL, "Should not be NULL"); |
3557 assert(new_chunk->next() == NULL, "Should not be on a list"); |
3559 assert(new_chunk->next() == NULL, "Should not be on a list"); |
3558 |
3560 |
3559 new_chunk->reset_empty(); |
3561 new_chunk->reset_empty(); |
3560 |
3562 |