summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/CompileServer.scala
diff options
context:
space:
mode:
authorJanek Bogucki <janekdb@gmail.com>2017-01-15 20:16:47 +0000
committerJanek Bogucki <janekdb@gmail.com>2017-01-15 20:16:47 +0000
commit2268aabbcbc1a4ad6ac3d6cde960dfeb85ffbb5b (patch)
tree404a0540d76e99b7a9dbba714278f4bf8c2bfde4 /src/compiler/scala/tools/nsc/CompileServer.scala
parent827d69d48e96d9add75ce19e06b374610784c936 (diff)
downloadscala-2268aabbcbc1a4ad6ac3d6cde960dfeb85ffbb5b.tar.gz
scala-2268aabbcbc1a4ad6ac3d6cde960dfeb85ffbb5b.tar.bz2
scala-2268aabbcbc1a4ad6ac3d6cde960dfeb85ffbb5b.zip
Calculate MB instead of MiB
This is consistent with same calculation in Compilers.freeMemoryString.
Diffstat (limited to 'src/compiler/scala/tools/nsc/CompileServer.scala')
-rw-r--r--src/compiler/scala/tools/nsc/CompileServer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/CompileServer.scala b/src/compiler/scala/tools/nsc/CompileServer.scala
index 9cac497a85..ffe95ba9dc 100644
--- a/src/compiler/scala/tools/nsc/CompileServer.scala
+++ b/src/compiler/scala/tools/nsc/CompileServer.scala
@@ -47,7 +47,7 @@ class StandardCompileServer(fixPort: Int = 0) extends SocketServer(fixPort) {
}
def printMemoryStats() {
- def mb(bytes: Long) = "%dMB".format(bytes / 1000000)
+ def mb(bytes: Long) = "%10.2fMB".format(bytes / 1048576.0)
info("New session: total memory = %s, max memory = %s, free memory = %s".format(
mb(totalMemory), mb(maxMemory), mb(freeMemory)))
}