Memory limit in xz (/usr/local/bin/xz)

Bruce Cran bruce at
Tue Jun 15 06:27:27 UTC 2010

On Tuesday 15 June 2010 03:57:28 Olivier Nicole wrote:
> Hi,
> Since I upgraded that machine from 6.x to 7.3 I am hitting a memory
> limit with xz when trying to build/upgrade several ports.
> The error message looks like:
>   /usr/local/bin/xz: /usr/ports/distfiles//libpng-1.4.1.tar.xz: Memory
> usage limit reached /usr/local/bin/xz: Limit was 46 MiB, but 65 MiB would
> have been needed
> Is there a config parameter to tell the make files in /usr/ports to
> desactivate xz memory limit?

From xz(1):

       To  prevent uncomfortable surprises caused by huge memory usage, xz has
       a built-in memory usage limiter. While some operating  systems  provide
       ways  to  limit  the  memory  usage  of processes, relying on it wasn't
       deemed to be flexible enough. The default limit depends  on  the  total
       amount of physical RAM:


The default limit can be overridden with --memory=limit.


       XZ_OPT A space-separated list of options is parsed from  XZ_OPT  before
              parsing  the  options  given on the command line. Note that only
              options are parsed from XZ_OPT;  all  non-options  are  silently
              ignored.  Parsing is done with getopt_long(3) which is used also
              for the command line arguments.

Bruce Cran

More information about the freebsd-questions mailing list