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

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

1  
!7
2  
3  
// Run with: java -Xms512m -Xmx2g -XX:+UseG1GC -jar x30.jar 1026571
4  
// (using http://botcompany.de:8081/x30.jar)
5  
6  
static byte[] bla;
7  
8  
p {
9  
  bla = new byte[512*1024*1024];
10  
  
11  
  repeat with sleep 1 {
12  
    System.gc();
13  
    printWithTime("Performed GC. " + renderHeapSizeWithTotal());
14  
    bla = null;
15  
  }
16  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, 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: 204 / 635
Version history: 5 change(s)
Referenced in: [show references]