equal
deleted
inserted
replaced
695 size_t smallest_chunk_size() { return specialized_chunk_size(); } |
695 size_t smallest_chunk_size() { return specialized_chunk_size(); } |
696 |
696 |
697 size_t allocated_blocks_words() const { return _allocated_blocks_words; } |
697 size_t allocated_blocks_words() const { return _allocated_blocks_words; } |
698 size_t allocated_blocks_bytes() const { return _allocated_blocks_words * BytesPerWord; } |
698 size_t allocated_blocks_bytes() const { return _allocated_blocks_words * BytesPerWord; } |
699 size_t allocated_chunks_words() const { return _allocated_chunks_words; } |
699 size_t allocated_chunks_words() const { return _allocated_chunks_words; } |
|
700 size_t allocated_chunks_bytes() const { return _allocated_chunks_words * BytesPerWord; } |
700 size_t allocated_chunks_count() const { return _allocated_chunks_count; } |
701 size_t allocated_chunks_count() const { return _allocated_chunks_count; } |
701 |
702 |
702 bool is_humongous(size_t word_size) { return word_size > medium_chunk_size(); } |
703 bool is_humongous(size_t word_size) { return word_size > medium_chunk_size(); } |
703 |
704 |
704 static Mutex* expand_lock() { return _expand_lock; } |
705 static Mutex* expand_lock() { return _expand_lock; } |
3347 |
3348 |
3348 size_t Metaspace::capacity_bytes_slow(MetadataType mdtype) const { |
3349 size_t Metaspace::capacity_bytes_slow(MetadataType mdtype) const { |
3349 return capacity_words_slow(mdtype) * BytesPerWord; |
3350 return capacity_words_slow(mdtype) * BytesPerWord; |
3350 } |
3351 } |
3351 |
3352 |
|
3353 size_t Metaspace::allocated_blocks_bytes() const { |
|
3354 return vsm()->allocated_blocks_bytes() + |
|
3355 (using_class_space() ? class_vsm()->allocated_blocks_bytes() : 0); |
|
3356 } |
|
3357 |
|
3358 size_t Metaspace::allocated_chunks_bytes() const { |
|
3359 return vsm()->allocated_chunks_bytes() + |
|
3360 (using_class_space() ? class_vsm()->allocated_chunks_bytes() : 0); |
|
3361 } |
|
3362 |
3352 void Metaspace::deallocate(MetaWord* ptr, size_t word_size, bool is_class) { |
3363 void Metaspace::deallocate(MetaWord* ptr, size_t word_size, bool is_class) { |
3353 assert(!SafepointSynchronize::is_at_safepoint() |
3364 assert(!SafepointSynchronize::is_at_safepoint() |
3354 || Thread::current()->is_VM_thread(), "should be the VM thread"); |
3365 || Thread::current()->is_VM_thread(), "should be the VM thread"); |
3355 |
3366 |
3356 MutexLockerEx ml(vsm()->lock(), Mutex::_no_safepoint_check_flag); |
3367 MutexLockerEx ml(vsm()->lock(), Mutex::_no_safepoint_check_flag); |