Hi Richard,

Our library runs in video games (on both consoles and mobile devices), and many game developers detest calls to malloc/free at run-time but they are happy to give me a sizable chunk in one go. So I'm using memsys5 as an optional memory pool in an attempt to reduce the number of *user* allocations. The user is able to plug in their own malloc/free replacements as well in which case the memory pool is redundant, but the pool is there as a shield in the default configuration.

Kind regards,

Philip Bennefall
On 9/5/2016 7:39 PM, Richard Hipp wrote:
On 9/5/16, Philip Bennefall <phi...@blastbay.com> wrote:
I am using [memsys5] as a general purpose
memory pool in my application.
There is a strong feeling in some parts of the open-source community
that nobody should ever attempt to build their own memory allocator.
The malloc/free from the standard library is believed to be good
enough for every situation and any attempt to work around standard
malloc/free is discouraged.

SQLite uses system malloc/free by default, as you know.  But even the
presence of memsys5 in the source tree as a compile-time option is
controversial in some circles.  I put memsys5 there for good reasons,
but they are obscure reasons, which is why memsys5 is usually omitted
from the build.

So I'm wondering:  Why are *you* using memsys5 rather than malloc/free
from the standard library?

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to