8229407: Avoid ConcurrentHashMap resizes during bootstrap
Reviewed-by: alanb, shade, dfuchs
This commit is contained in:
parent
438c7a5dba
commit
cfb3b64704
src/java.base/share/classes/jdk/internal
@ -183,7 +183,7 @@ public class BuiltinClassLoader
|
||||
this.parent = parent;
|
||||
this.ucp = ucp;
|
||||
|
||||
this.nameToModule = new ConcurrentHashMap<>();
|
||||
this.nameToModule = new ConcurrentHashMap<>(32);
|
||||
this.moduleToReader = new ConcurrentHashMap<>();
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ public final class ServicesCatalog {
|
||||
}
|
||||
|
||||
// service name -> list of providers
|
||||
private final Map<String, List<ServiceProvider>> map = new ConcurrentHashMap<>();
|
||||
private final Map<String, List<ServiceProvider>> map = new ConcurrentHashMap<>(32);
|
||||
|
||||
private ServicesCatalog() { }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user