I think I found the answer to my own question:

(1) Pick an arbtrary, huge initial value for nnn
in the compilation option SQLITE_MEMORY_SIZE=nnn;

(2) Let my app run for awhile;

(3) Call sqlite_memory_highwater() to find out
the maximum amount of memory that has ever been
allocated (i.e. the high water mark);

(4) Recompile with SQLITE_MEMORY_SIZE = high_
water_mark + 20% (or whatever).

- Richard


Richard Klein wrote:
> I've been porting 3.5.6 to my company's embedded
> platform.  I've implemented a custom VFS, and a
> custom Mutex subsystem, and these seem to work
> just fine.
> 
> I tried to implement a custom Memory subsystem,
> but I see that as of 3.5.2 the compilation option
> SQLITE_OMIT_MEMORY_ALLOCATION is no longer supported.
> 
> Instead, it is recommended that I use the compilation
> option SQLITE_MEMORY_SIZE=nnn, which will cause SQLite
> to allocate memory from a static block of storage that
> is nnn bytes in size.
> 
> My question is:  What is a reasonable value for nnn?
> 
> Thanks,
> - Richard
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to