aboutsummaryrefslogtreecommitdiff
path: root/src/xzdec/xzdec.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-11-15 12:40:17 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-11-15 12:40:17 +0200
commit93e418562cf127a9171e87bcd4e9af8e1bfcdae4 (patch)
treeed57e18edfa1758f3763d7b85c370a8926861ccb /src/xzdec/xzdec.c
parentUpdated THANKS. (diff)
downloadxz-93e418562cf127a9171e87bcd4e9af8e1bfcdae4.tar.xz
Add lzma_physmem().
I had hoped to keep liblzma as purely a compression library as possible (e.g. file I/O will go into a different library), but it seems that applications linking agaisnt liblzma need some way to determine the memory usage limit, and knowing the amount of RAM is one reasonable way to help making such decisions. Thanks to Jonathan Nieder for the original patch.
Diffstat (limited to 'src/xzdec/xzdec.c')
-rw-r--r--src/xzdec/xzdec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/xzdec/xzdec.c b/src/xzdec/xzdec.c
index 4f40f1d6..0abccebb 100644
--- a/src/xzdec/xzdec.c
+++ b/src/xzdec/xzdec.c
@@ -21,7 +21,6 @@
#include "getopt.h"
#include "tuklib_progname.h"
#include "tuklib_exit.h"
-#include "tuklib_physmem.h"
#ifdef TUKLIB_DOSLIKE
# include <fcntl.h>
@@ -104,7 +103,7 @@ version(void)
static void
memlimit_set_percentage(uint32_t percentage)
{
- uint64_t mem = tuklib_physmem();
+ uint64_t mem = lzma_physmem();
// If we cannot determine the amount of RAM, use the assumption
// set by the configure script.