summaryrefslogtreecommitdiff
path: root/appl/wm/memory.b
diff options
context:
space:
mode:
Diffstat (limited to 'appl/wm/memory.b')
-rw-r--r--appl/wm/memory.b6
1 files changed, 3 insertions, 3 deletions
diff --git a/appl/wm/memory.b b/appl/wm/memory.b
index 6bbfa68b..77221a8f 100644
--- a/appl/wm/memory.b
+++ b/appl/wm/memory.b
@@ -109,9 +109,9 @@ realinit(ctxt: ref Draw->Context)
maxx+x,
a[i].y + 8);
cmd(t, s);
- s = sys->sprint(".c itemconfigure %s -text '%s", a[i].tagsz, string a[i].size);
+ s = sys->sprint(".c itemconfigure %s -text '%s", a[i].tagsz, sizestr(a[i].size));
cmd(t, s);
- s = sys->sprint(".c itemconfigure %s -text '%d", a[i].tagiu, a[i].allocs-a[i].frees);
+ s = sys->sprint(".c itemconfigure %s -text '%s", a[i].tagiu, sizestr(a[i].allocs-a[i].frees));
cmd(t, s);
}
cmd(t, "update");
@@ -163,7 +163,7 @@ initdraw(n: int): int
sizestr(n: int): string
{
- if ((n / 1024) % 1024 == 0)
+ if ((n / 1024) % 1024 == 0 || n > (100 * 1024 * 1024))
return string (n / (1024 * 1024)) + "M";
return string (n / 1024) + "K";
}