From 96a4f840e3b9ca5c81e5711ff9c267b194f93ef1 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sun, 31 Jan 2010 18:17:50 +0200 Subject: Improve displaying of the memory usage limit. --- src/xz/util.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/xz/util.c') diff --git a/src/xz/util.c b/src/xz/util.c index 784f6d30..dd95fa7a 100644 --- a/src/xz/util.c +++ b/src/xz/util.c @@ -119,6 +119,13 @@ error: } +extern uint64_t +round_up_to_mib(uint64_t n) +{ + return (n >> 20) + ((n & ((UINT32_C(1) << 20) - 1)) != 0); +} + + extern const char * uint64_to_str(uint64_t value, uint32_t slot) { -- cgit v1.2.3