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

23
LINES

< > BotCompany Repo | #1011522 // compressedOOPSEnabled

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (7707L) is out of date.

static bool compressedOOPSEnabled_is64bitHotSpot;
static bool compressedOOPSEnabled_compressedOOPS;
static bool compressedOOPSEnabled_checked;

sbool compressedOOPSEnabled() {
  if (compressedOOPSEnabled_checked) ret compressedOOPSEnabled_compressedOOPS;
  
  S OS_ARCH = System.getProperty("os.arch");
  S MANAGEMENT_FACTORY_CLASS = "java.lang.management.ManagementFactory";
  S HOTSPOT_BEAN_CLASS = "com.sun.management.HotSpotDiagnosticMXBean";

  S x = System.getProperty("sun.arch.data.model");
  bool is64Bit = contains(or(x, OS_ARCH), "64");
    
  if (is64Bit) {
    compressedOOPSEnabled_is64bitHotSpot = true;
    compressedOOPSEnabled_compressedOOPS =
      !eq("false", getHotspotVMOption("UseCompressedOops"));
  }
  
  compressedOOPSEnabled_checked = true;
  ret compressedOOPSEnabled_compressedOOPS;
}

Author comment

Began life as a copy of #1011521

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011522
Snippet name: compressedOOPSEnabled
Eternal ID of this version: #1011522/6
Text MD5: fda0ce9be62b92884187d8af5d41d9c9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-04-11 19:56:14
Source code size: 837 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 458 / 573
Version history: 5 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1013372 - isCompressedOOPS - synonym of compressedOOPSEnabled
#1035193 - isHotspotVMOptionSet
#1035194 - compressedOOPSEnabled (backup)
#1035195 - compressedClassPointersEnabled