Uses 911K of libraries. Click here for Pure Java version (3288L/16K).
1 | !7 |
2 | |
3 | cmodule JavaHeapRaw > DynBigNumber { |
4 | start { |
5 | setDescription("Java heap used of " + toM(Runtime.getRuntime().maxMemory()) + " MB"); |
6 | ownTimer(doEveryAndNow(1000, r actualUpdate)); |
7 | } |
8 | |
9 | visualize { |
10 | ret setToolTipText("Process ID: " + getProcessID(), componentPopupMenuItem(super.visualize(), |
11 | "Garbage Collect", r { dm_gc(); actualUpdate(); })); |
12 | } |
13 | |
14 | void actualUpdate { |
15 | //long max = Runtime.getRuntime().maxMemory(); |
16 | //long used = memoryUsedAfterLastGC(); |
17 | long used = usedMemory(); |
18 | setValue(toM(used) + " MB"); |
19 | } |
20 | } |
Began life as a copy of #1016151
download show line numbers debug dex old transpilations
Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, ktbwgngfmivo, lpdgvwnxivlt, mqqgnosmbjvj, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1016153 |
Snippet name: | Java Heap, Raw Value [Dyn Module] |
Eternal ID of this version: | #1016153/5 |
Text MD5: | 47dda147a64df98860f5139a3864ac78 |
Transpilation MD5: | be6555526c19922135c950489845a5ba |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-07 18:39:43 |
Source code size: | 580 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 532 / 352276 |
Version history: | 4 change(s) |
Referenced in: | [show references] |