summaryrefslogtreecommitdiff
path: root/appl/wm/memory.b
diff options
context:
space:
mode:
authorCharles Forsyth <charles.forsyth@gmail.com>2024-04-22 07:09:01 +0100
committerGitHub <noreply@github.com>2024-04-22 07:09:01 +0100
commit73b5cba380d148e77d696880027a416cda50f756 (patch)
treea642616d55c1d79ff9ef22e325c359947dbfbcf0 /appl/wm/memory.b
parent22dd4b9c0961cd615779c72accc1e150357289cf (diff)
parent1bf9388ccb3bd33b5825ee20ec6824b17508f045 (diff)
Merge pull request #16 from pete/multiple-small-fixes
Multiple small fixes
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";
}