aboutsummaryrefslogtreecommitdiff
path: root/src/xz/util.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-01-31 18:17:50 +0200
committerLasse Collin <lasse.collin@tukaani.org>2010-01-31 18:17:50 +0200
commit96a4f840e3b9ca5c81e5711ff9c267b194f93ef1 (patch)
tree3537787a03d694748415c014bcdf718753f59b0b /src/xz/util.c
parentDon't use uninitialized sigset_t. (diff)
downloadxz-96a4f840e3b9ca5c81e5711ff9c267b194f93ef1.tar.xz
Improve displaying of the memory usage limit.
Diffstat (limited to '')
-rw-r--r--src/xz/util.c7
1 files changed, 7 insertions, 0 deletions
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)
{