that's false.if you disable overcommit, which is a pretty sane thing to do ( see http://ewontfix.com/3/ ), you can very well run out of ram.
i dont see how calling abort() would improve the situation over segfaulting. in fact you would just create a library that cannot be used in a robust application, and may lead to a termbox entry on http://suckless.org/sucks . aborting on resource exhaustion is a bug.
this change doesnt really seem to make sense, you're swapping a robust 30 line implementation (the passed buffer is static) out for a non-robust permanently malloc'ing and free'ing 70 line implementation of which the header even relies on unportable compiler specific pragmas.
this change doesnt really seem to make sense, you're swapping a robust 30 line implementation (the passed buffer is static) out for a non-robust permanently malloc'ing and free'ing 70 line implementation of which the header even relies on unportable compiler specific pragmas.
See later commits, I replace both memstream and ringbuffer with bytebuffer. That was the reason for rewriting memstream in the first place. If I can use a simple universal concept for both of the needs, why not. You're free to disagree, but it's a simplification of the code.
you're aware that malloc can fail ?