mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
7197557: NPG: nsk/sysdict/vm/stress/chain/chain004 hangs intermittently
Reviewed-by: johnc, ysr
This commit is contained in:
parent
a08d48f9b1
commit
cf5f4f736f
4 changed files with 51 additions and 10 deletions
|
@ -2843,6 +2843,21 @@ MetaWord* Metaspace::allocate(size_t word_size, MetadataType mdtype) {
|
|||
}
|
||||
}
|
||||
|
||||
MetaWord* Metaspace::expand_and_allocate(size_t word_size, MetadataType mdtype) {
|
||||
MetaWord* result;
|
||||
MetaspaceGC::set_expand_after_GC(true);
|
||||
size_t before_inc = MetaspaceGC::capacity_until_GC();
|
||||
size_t delta_words = MetaspaceGC::delta_capacity_until_GC(word_size);
|
||||
MetaspaceGC::inc_capacity_until_GC(delta_words);
|
||||
if (PrintGCDetails && Verbose) {
|
||||
gclog_or_tty->print_cr("Increase capacity to GC from " SIZE_FORMAT
|
||||
" to " SIZE_FORMAT, before_inc, MetaspaceGC::capacity_until_GC());
|
||||
}
|
||||
result = allocate(word_size, mdtype);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Space allocated in the Metaspace. This may
|
||||
// be across several metadata virtual spaces.
|
||||
char* Metaspace::bottom() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue