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

14
LINES

< > BotCompany Repo | #1016698 // gcRenderChangesInUsedMemory

JavaX fragment (include)

1  
sS gcRenderChangesInUsedMemory(GcInfo info) {
2  
  Map<S, MemoryUsage> map1 = info.getMemoryUsageBeforeGc();
3  
  Map<S, MemoryUsage> map2 = info.getMemoryUsageAfterGc();
4  
  
5  
  new L<S> changes;
6  
  for (S pool, MemoryUsage after : map2) {
7  
    MemoryUsage before = map1.get(pool);
8  
    if (before == null) continue;
9  
    long change = after.getUsed()-before.getUsed();
10  
    if (change != 0)
11  
      changes.add(pool + ": " + toK(change) + " K");
12  
  }
13  
  ret joinWithComma(changes);
14  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016698
Snippet name: gcRenderChangesInUsedMemory
Eternal ID of this version: #1016698/1
Text MD5: e718cc653713e9d1e9e871938f0a7fc3
Author: stefan
Category: javax / gc / monitoring
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-28 14:24:14
Source code size: 480 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 362 / 386
Referenced in: [show references]