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

20
LINES

< > BotCompany Repo | #1015915 // OS Size In Memory [Dyn Module]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 6315K of libraries. Click here for Pure Java version (6839L/36K).

!7

cmodule ProcessResidentSize > DynBigNumber {
  start {
    setDescription("OS SIZE IN MEMORY");
    doEveryAndNow(10000, r actualUpdate);
  }
  
  void actualUpdate {
    //time "PRS" { // takes ~10 ms
      setValue(toM(oshi_currentProcessResidentSize()) + " MB");
      setModuleName("OS Size In Memory: " + value);
    //}
  }
  
  visualize {
    ret setToolTipText("Process ID: " + getProcessID(), componentPopupMenuItem(super.visualize(),
      "Garbage Collect", r { dm_gc(); actualUpdate(); }));
  }
}

Author comment

Began life as a copy of #1015898

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: #1015915
Snippet name: OS Size In Memory [Dyn Module]
Eternal ID of this version: #1015915/22
Text MD5: 9a6dc40d5d9f806c5e6a74b3b9bc5c9a
Transpilation MD5: 7dfed01caa277a9fdf833ea7eafee31f
Author: stefan
Category: javax / modules
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-16 22:13:10
Source code size: 532 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 655 / 90961
Version history: 21 change(s)
Referenced in: [show references]