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

16
LINES

< > BotCompany Repo | #1026571 - Try to release heap beyond -Xms value (not possible)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (2214L/14K).

!7

// Run with: java -Xms512m -Xmx2g -XX:+UseG1GC -jar x30.jar 1026571
// (using http://botcompany.de:8081/x30.jar)

static byte[] bla;

p {
  bla = new byte[512*1024*1024];
  
  repeat with sleep 1 {
    System.gc();
    printWithTime("Performed GC. " + renderHeapSizeWithTotal());
    bla = null;
  }
}

download  show line numbers  debug dex   

Travelled to 3 computer(s): mqqgnosmbjvj, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026571
Snippet name: Try to release heap beyond -Xms value (not possible)
Eternal ID of this version: #1026571/6
Text MD5: 27f9244e920227b236eb0c84918460f0
Transpilation MD5: c9407ac93191341842a0d79b471f466b
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-14 13:49:44
Source code size: 320 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 44 / 90
Version history: 5 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1026571 & http://1026571.tinybrain.de