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

5
LINES

< > BotCompany Repo | #1002320 // getMemoryInfo

JavaX fragment (include)

static S getMemoryInfo() {
  long total = Runtime.getRuntime().totalMemory();
  long avail = Runtime.getRuntime().freeMemory();
  ret "Heap: " + iceil(toM_double(total-avail)) + "/" + iceil(toM_double(total)) + " MB";
}

Author comment

Began life as a copy of #1002037

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002320
Snippet name: getMemoryInfo
Eternal ID of this version: #1002320/1
Text MD5: 34ca8df4a3d804685af9f78ea14b5b48
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-13 13:42:11
Source code size: 223 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 670 / 916
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1005955 - getFullMemoryInfo - including stuff fetched through command line tools
#1005958 - printHeapSize
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1011714 - getMemoryInfoPlusSystemMemory
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)