Skip to content
This repository
Browse code

use `-XX:+UseCompressedOops` for 64 bit jvm

  • Loading branch information...
commit 5275c48cd9de436480aaa32f628db9f961c0f2b7 1 parent d0ad75b
Indrajit Raychaudhuri authored March 18, 2012

Showing 2 changed files with 9 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  liftsh
  2. 6  liftsh.cmd
3  liftsh
@@ -8,6 +8,9 @@ fi
8 8
 # Internal options, always specified
9 9
 INTERNAL_OPTS="-Dfile.encoding=UTF-8 -Xmx768m -noverify -XX:ReservedCodeCacheSize=96m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=512m"
10 10
 
  11
+# Add 64bit specific option
  12
+exec java -version 2>&1 | grep -q "64-Bit" && INTERNAL_OPTS="${INTERNAL_OPTS} -XX:+UseCompressedOops"
  13
+
11 14
 # Default options, if nothing is specified
12 15
 DEFAULT_OPTS=""
13 16
 
6  liftsh.cmd
@@ -3,6 +3,12 @@
3 3
 @REM Internal options, always specified
4 4
 set INTERNAL_OPTS=-Dfile.encoding=UTF-8 -Xmx768m -noverify -XX:ReservedCodeCacheSize=96m -XX:+UseCompressedOops -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=512m
5 5
 
  6
+@REM Add 64bit specific option
  7
+java -version 2>&1 | find "64-Bit" >nul:
  8
+if not errorlevel 1 (
  9
+  set INTERNAL_OPTS=%INTERNAL_OPTS% -XX:+UseCompressedOops
  10
+)
  11
+
6 12
 @REM Default options, if nothing is specified
7 13
 set DEFAULT_OPTS=
8 14
 

0 notes on commit 5275c48

Please sign in to comment.
Something went wrong with that request. Please try again.