mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 14:54:29 +08:00
GP-6213: You can now set Ghidra MAXMEM via an assortment of environment
variables
This commit is contained in:
@@ -4,9 +4,16 @@
|
||||
# Ghidra launch
|
||||
#----------------------------------------
|
||||
|
||||
# Maximum heap memory may be changed if default is inadequate. This will generally be up to 1/4 of
|
||||
# the physical memory available to the OS. Uncomment MAXMEM setting if non-default value is needed.
|
||||
#MAXMEM=2G
|
||||
# Optionally override the default Java heap memory, which is typically 1/4 of system RAM.
|
||||
# Supported values are of the regular expression form "\d+[gGmMkK]", allowing the value to be
|
||||
# specified in gigabytes, megabytes, or kilobytes (for example: 8G, 4096m, etc).
|
||||
MAXMEM_DEFAULT=
|
||||
|
||||
# Allow the above MAXMEM_DEFAULT to be overridden by externally set environment variables
|
||||
# - GHIDRA_MAXMEM: Desired maximum heap memory for all Ghidra instances
|
||||
# - GHIDRA_GUI_MAXMEM: Desired maximum heap memory only for Ghidra GUI instances
|
||||
GHIDRA_MAXMEM=${GHIDRA_MAXMEM:=${MAXMEM_DEFAULT}}
|
||||
GHIDRA_GUI_MAXMEM=${GHIDRA_GUI_MAXMEM:=${GHIDRA_MAXMEM}}
|
||||
|
||||
# Resolve symbolic link if present and get the directory this script lives in.
|
||||
# NOTE: "readlink -f" is best but works on Linux only, "readlink" will only work if your PWD
|
||||
@@ -16,4 +23,4 @@ SCRIPT_FILE="$(readlink -f "$0" 2>/dev/null || readlink "$0" 2>/dev/null || echo
|
||||
SCRIPT_DIR="${SCRIPT_FILE%/*}"
|
||||
|
||||
# Launch Ghidra
|
||||
"${SCRIPT_DIR}"/support/launch.sh bg jdk Ghidra "${MAXMEM}" "" ghidra.GhidraRun "$@"
|
||||
"${SCRIPT_DIR}"/support/launch.sh bg jdk Ghidra "${GHIDRA_GUI_MAXMEM}" "" ghidra.GhidraRun "$@"
|
||||
|
||||
Reference in New Issue
Block a user