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

7
LINES

< > BotCompany Repo | #1016743 // monitorThreadAllocatedMemory

JavaX fragment (include)

svoid monitorThreadAllocatedMemory() {
  ThreadMXBean bean = threadMXBean();
  
  if (bean instanceof com.sun.management.ThreadMXBean &&
    ((com.sun.management.ThreadMXBean) bean).isThreadAllocatedMemorySupported())
      ((com.sun.management.ThreadMXBean) bean).setThreadAllocatedMemoryEnabled(true);
}

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: #1016743
Snippet name: monitorThreadAllocatedMemory
Eternal ID of this version: #1016743/3
Text MD5: b4907c22724cc40e2de9696a35e4df6a
Author: stefan
Category: javax / monitoring
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-30 21:31:23
Source code size: 313 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 335 / 362
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1016749 - threadAllocatedMemoryEnabled