Adjusted memory usage display to show the memory used instead of memory total, and to use base 2 instead of base 10 to show the correct amount of memory.
@@ -121,8 +121,8 @@ public class ImportingJob {
}
JSONUtilities.safePut(progress, "message", message);
JSONUtilities.safePut(progress, "percent", percent);
- JSONUtilities.safePut(progress, "memory", Runtime.getRuntime().totalMemory() / 1000000);
- JSONUtilities.safePut(progress, "maxmemory", Runtime.getRuntime().maxMemory() / 1000000);
+ JSONUtilities.safePut(progress, "memory", Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory() / 1048576);
+ JSONUtilities.safePut(progress, "maxmemory", Runtime.getRuntime().maxMemory() / 1048576);
}
}
