Fixing getMemoryUsage for virtual memory