diff options
| author | Pete <pete@debu.gs> | 2023-11-02 10:56:44 -0700 |
|---|---|---|
| committer | Pete <pete@debu.gs> | 2024-04-16 18:39:27 -0700 |
| commit | 15eb91f21764fe77dde68fb327360e7f85bf9714 (patch) | |
| tree | f750f7aa8463914bebb43da190f93bd54ee72050 /appl | |
| parent | 54b1df79e786e6e814d581a73354fc955a33793e (diff) | |
Make the wm/memory display more readable by converting uniformly.
Diffstat (limited to 'appl')
| -rw-r--r-- | appl/wm/memory.b | 6 |
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"; } |
