> Bash uses its own malloc implementation for unknown reasons (at least
> to me).

Performance in some environments.

> This implementation dates back to 4.2BSD (according to INSTALL) and
> uses brk() which seems to be obsoleted interface.

It is obsolete and not portable (man sbrk). Custom allocators should be
based on malloc.

> we have ecountered situation when brk(), as used by bash's malloc,
> fails causing SIGSEGV in bash.

The segfault is likely in libc (locale/findlocale.c) because it doesn't
expect to run out of memory at the beginning of the program.

Some other environments require --without-bash-malloc.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to