Conversation
emmalloc functions were returning NULL on error, but didn't set errno.
|
Errno is not DCEable, requires an awkward TLS slot that user might not have asked for, and very rarely used in web space. (in the close to decade of emmalloc, nobody ever asked for errno support) I think if something, we should make the alignment failures abort in development mode, rather than return 0. So that way if emmalloc return 0, one will know it was due to an OOM. In The main reason to use emmalloc instead of dlmalloc is to get smaller code size. So it would be best to optimize it for the smallest code size to keep that angle intact. |
I agree, except for the |
In fact malloc itself can only ever fail with |
emmallocfunctions were returningNULLon error, but didn't seterrno.