Skip to content

Commit 996f6d5

Browse files
committed
GP-6067 Limit Ghidra Server service wrapper to 512MB heap size
1 parent c0a8981 commit 996f6d5

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Ghidra/RuntimeScripts/Common/server/server.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ wrapper.ntservice.failure_actions.actions_delay=60000
273273

274274
# Specify JVM arguments to be used by installed service wrapper process.
275275

276-
# Maximum Java Heap Size (in MB) for installed service wrapper.
276+
# Maximum Java Heap Size for installed service wrapper.
277277
# NOTE: See also -Xmx option specification with ghidraSvr script which relates to other
278278
# uses of the YAJSW wrapper (e.g., console mode).
279-
wrapper.ntservice.additional.1=-Xmx1G
279+
wrapper.ntservice.additional.1=-Xmx512M
280280

281281
# Uncomment to enable detailed memory tracking capability for the installed service wrapper process.
282282
# This will allow command such as the following to dump memory use information:

Ghidra/RuntimeScripts/Linux/server/ghidraSvr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ fi
174174
# Specify JVM arguments for direct invocations of YAJSW wrapper, including specification
175175
# of maximum heap size (-Xmx) option.
176176
VMARGS=()
177-
VMARGS+=("-Xmx1G")
177+
VMARGS+=("-Xmx512M")
178178
VMARGS+=("-Djna_tmpdir=${WRAPPER_TMPDIR}")
179179
VMARGS+=("-Djava.io.tmpdir=${WRAPPER_TMPDIR}")
180180

Ghidra/RuntimeScripts/Windows/server/ghidraSvr.bat

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,10 @@ set "java=%LS_JAVA_HOME%\bin\java.exe"
185185
:: execute command OPTION
186186
:lab3
187187

188-
set VMARGS=-Djava.io.tmpdir="%WRAPPER_TMPDIR%"
188+
:: Specify JVM arguments for direct invocations of YAJSW wrapper, including specification
189+
:: of maximum heap size (-Xmx) option.
190+
set VMARGS=-Xmx512M
191+
set VMARGS=%VMARGS% -Djava.io.tmpdir="%WRAPPER_TMPDIR%"
189192
set VMARGS=%VMARGS% -Djna_tmpdir="%WRAPPER_TMPDIR%"
190193

191194
:: set DEBUG=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:18888

0 commit comments

Comments
 (0)