Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > TinyBrain | #1008034 - Set Global JavaX Option: Even Smaller Heap (G1, 10-20% slack, string deduplication)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar - homepage

Libraryless. Click here for Pure Java version (1540L/10K/36K).

!752

p {
  S s = javaxDefaultVMArgs(), old = s;
  print("Default VM Args: " + quote(s));
  s = s.replaceAll("-XX:MaxHeapFreeRatio=\\d+", "");
  s = s.replaceAll("-XX:MinHeapFreeRatio=\\d+", "");
  s = trim(s);
  s = trim(s + " -XX:MaxHeapFreeRatio=20 -XX:MinHeapFreeRatio=10");
  if (!s.contains("-XX:+UseG1GC")) s = trim(s + " -XX:+UseG1GC");
  if (!s.contains("-XX:+UseStringDeduplication"))
    s = trim(s + " -XX:+UseStringDeduplication");
  if (neq(old, s))
    setDefaultVMArgs(s);
  else
    print("Keeping.");
}

Author comment

Began life as a copy of #1006272

download  show line numbers  debug dex   

Travelled to 2 computer(s): cfunsshuasjs, tvejysmllsmz

No comments. add comment

Snippet ID: #1008034
Snippet name: Set Global JavaX Option: Even Smaller Heap (G1, 10-20% slack, string deduplication)
Eternal ID of this version: #1008034/7
Text MD5: a71901ee19629fdda995d275c2a8ae83
Transpilation MD5: f1aa5590de9e4242372b7330cd9998d2
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-26 03:16:56
Source code size: 536 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 28 / 37
Version history: 6 change(s)
Referenced in: [show]