public static long getTotalPhysicalMemorySize() {
        return ((OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize();
    }
Transfers objCount bytes from Memory starting at memoryOffset to buffer starting at bufferOffset

@param address      start offset in the memory
@param buffer       the data buffer
@param bufferOffset start offset of the buffer
@param count        number of bytes to transfer
indexr-common/src/main/java/io/indexr/util/MemoryUtil.java