On 1/7/18 2:27 AM, Eduardo A. Bustamante López wrote:

> 
> This is not related to Linux VM overcommit / OOM killer.
> 
> 
> From what I can see, Bash's internal memory allocator (lib/malloc/malloc.c,
> internal_malloc) is actually unable to allocate the ~580 MiB of VM, even if
> there's enough free physical memory to back it up.

That's the wrong number. The request is for 7329062664 bytes, which is
between 2**32 and 2**33 (around 7 gig) and so exceeds the maximum request
size:

bash: xmalloc: .././braces.c:793: cannot allocate 7329062664 bytes
(614682624 bytes allocated)

The 614682624 is the amount of memory the bash malloc has already obtained
from the kernel (the difference between the break at the first call to
malloc and the call when malloc failed).

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to