Roger Binns wrote:
> [M]ost software does not play well with running out of memory...
>

FWIW:  If a malloc() ever fails with SQLite, it will return
SQLITE_NOMEM.  It also sets a flag and will forever after
continue to return SQLITE_NOMEM even if you free up a bunch
of memory so that malloc() would start working again.  There
is no way to reset this condition.  Once a malloc() fails,
the party is over and you might as well shut down the process.

If malloc() fails, SQLite might also leak memory.  (Ironic,
isn't it?)

The only guarantees that SQLite makes after a malloc failure
is that it will not abort() or panic() or segfault.  Basically,
it just gives you a chance to shutdown gracefully.  This might
not sound like much, but as Roger points out, it is a lot
more than most other software packages offer.

--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565



Reply via email to