Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/java:master commit in: dev-java/icedtea/files/
Date: Mon, 26 Oct 2015 09:26:58
Message-Id: 1445851591.a3ae6c14a31b85c668d2c3c86254f4c2f10af866.chewi@gentoo
1 commit: a3ae6c14a31b85c668d2c3c86254f4c2f10af866
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 26 09:26:31 2015 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 26 09:26:31 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/java.git/commit/?id=a3ae6c14
7
8 dev-java/icedtea: Add missing patches
9
10 Package-Manager: portage-2.2.20.1
11
12 .../files/6-cacao-dynmaxheap-Makefile.patch | 10 ++++++
13 dev-java/icedtea/files/6-cacao-dynmaxheap.patch | 42 ++++++++++++++++++++++
14 2 files changed, 52 insertions(+)
15
16 diff --git a/dev-java/icedtea/files/6-cacao-dynmaxheap-Makefile.patch b/dev-java/icedtea/files/6-cacao-dynmaxheap-Makefile.patch
17 new file mode 100644
18 index 0000000..dc87ae8
19 --- /dev/null
20 +++ b/dev-java/icedtea/files/6-cacao-dynmaxheap-Makefile.patch
21 @@ -0,0 +1,10 @@
22 +--- Makefile.in.orig 2015-07-28 07:21:16.447388803 -0700
23 ++++ Makefile.in 2015-09-06 09:13:16.548000000 -0700
24 +@@ -182,6 +182,7 @@
25 + @WITH_RHINO_TRUE@ patches/rhino.patch
26 +
27 + @BUILD_CACAO_TRUE@am__append_22 = \
28 ++@BUILD_CACAO_TRUE@ patches/cacao/dynmaxheap.patch \
29 + @BUILD_CACAO_TRUE@ patches/cacao/launcher.patch \
30 + @BUILD_CACAO_TRUE@ patches/cacao/memory.patch \
31 + @BUILD_CACAO_TRUE@ patches/cacao/hotspot/original/memory.patch \
32
33 diff --git a/dev-java/icedtea/files/6-cacao-dynmaxheap.patch b/dev-java/icedtea/files/6-cacao-dynmaxheap.patch
34 new file mode 100644
35 index 0000000..33b9818
36 --- /dev/null
37 +++ b/dev-java/icedtea/files/6-cacao-dynmaxheap.patch
38 @@ -0,0 +1,42 @@
39 +# HG changeset patch
40 +# User James Le Cuirot <chewi@g.o>
41 +# Date 1441543564 -3600
42 +# Sun Sep 06 13:46:04 2015 +0100
43 +# Node ID d0224f4490d6694e77dcb0ff7eae8e2297b822bf
44 +# Parent e215e36be9fc2b7dfe43ff10ec1afe639b289aa5
45 +Dynamically set the maximum heap size on Linux
46 +
47 +diff -r e215e36be9fc -r d0224f4490d6 src/vm/vm.cpp
48 +--- cacao/cacao/src/vm/vm.cpp Mon Feb 11 19:31:28 2013 +0100
49 ++++ cacao/cacao/src/vm/vm.cpp Sun Sep 06 13:46:04 2015 +0100
50 +@@ -33,6 +33,10 @@
51 + #include <errno.h>
52 + #include <stdlib.h>
53 +
54 ++#if defined(__LINUX__)
55 ++#include <unistd.h>
56 ++#endif
57 ++
58 + #include "vm/types.h"
59 +
60 + #include "arch.h"
61 +@@ -702,6 +706,19 @@
62 + opt_heapstartsize = HEAP_STARTSIZE;
63 + opt_stacksize = STACK_SIZE;
64 +
65 ++#if defined(__LINUX__)
66 ++ // Calculate 1/4 of the physical memory.
67 ++ uint64_t qmem = sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE) / 4;
68 ++
69 ++ if (qmem > INT32_MAX) {
70 ++ // More than 2GB will overflow so cap it.
71 ++ opt_heapmaxsize = 2047 * 1024 * 1024;
72 ++ } else if (qmem > HEAP_MAXSIZE) {
73 ++ // Otherwise use this if greater than default (128MB).
74 ++ opt_heapmaxsize = (s4) qmem;
75 ++ }
76 ++#endif
77 ++
78 + // First of all, parse the -XX options.
79 +
80 + #if defined(ENABLE_VMLOG)