diff options
| author | ivan-boikov <ik.boikov.public@protonmail.com> | 2024-01-13 19:52:01 +0100 |
|---|---|---|
| committer | ivan-boikov <ik.boikov.public@protonmail.com> | 2024-01-13 19:52:01 +0100 |
| commit | 8b8363eaa2633c8a7392521416f45549ff10c164 (patch) | |
| tree | c503f910abdc6b280895fa28e008bec8edd637e1 /components/ram.c | |
| parent | f68f49273e70b3767b30c549dda04ddd4d25fc91 (diff) | |
My initial changes
Diffstat (limited to 'components/ram.c')
| -rw-r--r-- | components/ram.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/ram.c b/components/ram.c index 15c4b74..503e7be 100644 --- a/components/ram.c +++ b/components/ram.c @@ -53,7 +53,8 @@ != 1) return NULL; - return fmt_human(total * 1024, 1024); + //return fmt_human(total * 1024, 1024); + return bprintf("%.1f", total/1048576.); } const char * @@ -71,7 +72,8 @@ return NULL; used = (total - free - buffers - cached); - return fmt_human(used * 1024, 1024); + //return fmt_human(used * 1024, 1024); + return bprintf("%4.1f", used/1048576.); } #elif defined(__OpenBSD__) #include <stdlib.h> |
