rebuild geeqie
[oi-userland.git] / components / runtime / openjdk-8 / patches / 0037-patch-hotspot_src_share_vm_runtime_arguments.cpp.patch
blob128e1e1c6d86984453c1fa60caba3b3b732bd0b8
1 $NetBSD: patch-hotspot_src_share_vm_runtime_arguments.cpp,v 1.1 2015/08/27 19:03:59 joerg Exp $
3 On 64bit systems, the JVM by default reserves 1GB VA to mangle class
4 pointers into a 32bit representation. When the available memory is less
5 than 16GB, e.g. due to process limits, scale this down. Even unused
6 pages waste system resources and the default limit can stop the JVM
7 from starting with ulimit -v 2G.
9 --- hotspot/src/share/vm/runtime/arguments.cpp.orig 2015-08-26 15:02:34.000000000 +0000
10 +++ hotspot/src/share/vm/runtime/arguments.cpp
11 @@ -1808,6 +1808,12 @@ void Arguments::set_heap_size() {
12 FLAG_SET_ERGO(uintx, MaxHeapSize, (uintx)reasonable_max);
15 + if (FLAG_IS_DEFAULT(CompressedClassSpaceSize)) {
16 + julong reasonable_max = phys_mem / 16;
17 + reasonable_max = MIN2(reasonable_max, (julong)CompressedClassSpaceSize);
18 + FLAG_SET_ERGO(uintx, CompressedClassSpaceSize, (uintx)reasonable_max);
19 + }
21 // If the minimum or initial heap_size have not been set or requested to be set
22 // ergonomically, set them accordingly.
23 if (InitialHeapSize == 0 || min_heap_size() == 0) {