Joe Wilson <[EMAIL PROTECTED]> wrote: > The only real way to prevent allocation fragmentation is to move > blocks of memory around -
Not true. You can prevent fragmentation, for example, by not allocating objects beside each other that will be destroyed at different times. Or, you can pick a single allocation size and only do mallocs of exactly that size. The latter approach is what we are moving towards for SQLite. The allocation size would be the size of what Emery calls a "reap". If you deal with large strings and blobs you might need to allocate a chunk of memory larger than this, which destroys your fragmentation guarantees. But at least you can write testable requirements about when you guarantee that fragmentation will not occur. You are correct that avoiding fragmentation is very difficult. But is also very important for some users and it is thus something we want to be able to provide. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------