Blocks :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
When a static CDS archive is dumped, we unconditionally allocate a 4GB ReservedSpace and use that as the buffer for writing the archive content. We usually don't need such a big ReservedSpace. It also unnecessarily complicates Metaspace::global_initialize(). http://hg.openjdk.java.net/jdk/jdk/file/4d36e29a5410/src/hotspot/share/memory/metaspaceShared.cpp#l286 When a dynamic CDS archive is dumped, allocate a buffer that's just big enough. That way we are less likely to run out of memory: http://hg.openjdk.java.net/jdk/jdk/file/4d36e29a5410/src/hotspot/share/memory/dynamicArchive.cpp#l730 It makes no sense to have two different buffer allocation code. We should always use the second variant since it's more frugal and less intrusive.
|