Skip to content

Commit

Permalink
Fix #23951: Fix free in startup linux scripts when it is in a local…
Browse files Browse the repository at this point in the history
…ized environment

git-svn-id: https://josm.openstreetmap.de/svn/trunk@19234 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
taylor.smock committed Oct 7, 2024
1 parent ddd4c1f commit eba1eca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion native/linux/latest/usr/bin/josm-latest
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if [ -f "/etc/default/${JOSM_VERSION}" ]; then
fi

# If there is more than 8G ram, we can use up to 75% of the memory while still leaving 2G for other things.
if [ "$(free --mega | grep '^Mem:' | awk '{print $2}')" -gt 8192 ]; then
if [ "$(LC_ALL=C LANG=C free --mega | grep '^Mem:' | awk '{print $2}')" -gt 8192 ]; then
# But don't set anything if JAVA_OPTS is already set.
JAVA_OPTS="${JAVA_OPTS:=-XX:MaxRAMPercentage=75.0 -Xms256m}"
fi
Expand Down
2 changes: 1 addition & 1 deletion native/linux/tested/usr/bin/josm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if [ -f "/etc/default/${JOSM_VERSION}" ]; then
fi

# If there is more than 8G ram, we can use up to 75% of the memory while still leaving 2G for other things.
if [ "$(free --mega | grep '^Mem:' | awk '{print $2}')" -gt 8192 ]; then
if [ "$(LC_ALL=C LANG=C free --mega | grep '^Mem:' | awk '{print $2}')" -gt 8192 ]; then
# But don't set anything if JAVA_OPTS is already set.
JAVA_OPTS="${JAVA_OPTS:=-XX:MaxRAMPercentage=75.0 -Xms256m}"
fi
Expand Down

0 comments on commit eba1eca

Please sign in to comment.