0

In my application I get the estimated memory taken by the process from another application. But I am looking to get the exact memory required by the processor to run.

As I am searching online on how to get the correct memory required by the process, I found oshi lib does that. But I didn't find the the way to implement the solution. Can anyone please help me?

OSHI lib: https://github.com/oshi/oshi

FYI: We use OSHI lib to get the systemInfo, hardware, os, centralProcessor and global memory. Below is the code snippet.

    oshi.SystemInfo systemInfo = new oshi.SystemInfo();
    this.hal = systemInfo.getHardware();
    this.os = systemInfo.getOperatingSystem();
    this.centralProcessor = this.hal.getProcessor();
    this.globalMemory = this.hal.getMemory();
4

2 に答える 2