virtualMemory

fnVirtualMemory virtualMemory() @safe

Gets virtual memory statistics.

Returns

VirtualMemory structure with memory statistics.

Example:

auto mem = virtualMemory();
writeln("Total memory: ", mem.total / 1024 / 1024, " MB");
writeln("Available: ", mem.available / 1024 / 1024, " MB");
writeln("Used: ", mem.percent, "%");