[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] xmalloc: ../../../bash/lib/sh/makepath.c:116: cannot all
From: |
Bob Proulx |
Subject: |
Re: [Help-bash] xmalloc: ../../../bash/lib/sh/makepath.c:116: cannot allocate 265 bytes |
Date: |
Sun, 24 Nov 2013 19:01:00 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
adrelanos wrote:
> No, I wasn't sure if this would turn into a bug report. And to make my
> question as short as possible, I removed the "for file in /**; do...".
That is almost the same. The /** part will try to list every file on
the system all at one time all in one place and will consume as much
memory as needed to do so.
> >> ./a: xmalloc: ../../../bash/lib/sh/makepath.c:116: cannot allocate 265
> >> bytes (1123962880 bytes allocated)
> >>
> >> Is this expected?
> >
> > It depends upon how much memory you have in your system. If you do
>
> Ok, probably indeed due to too little RAM.
I wouldn't say you have too little ram. I would say that the command
expects to consume too much memory.
> > What system are you using?
>
> Debian Jessie 32 bit
Therefore your process will be limited to 3G of ram no matter what
anyway.
> > Rather than answer your question about combining sort with find and
> > about filenames with arbitrary whitespace such as newlines in them I
> > will pause and ask you to say what you are trying to do?
>
> When I run find on the same folder, the output needs to be deterministic
> (files in same order) regardless of how often find is being run. Seems
> like find already produces deterministic results and sort isn't required
> at all.
Find will process the files in directory order. That will be the same
from run to run as long as the files in the directory haven't changed
places.
Bob