Christian Smith wrote:


Because my project will run in an embedded environment, so I have to take care of the RAM consumption. I have went through the mail list, but not found the description of minimum RAM usage.

Could anyone tell me how much RAM is needed to run SQLite in an embedded environment?


That depends. SQLite can have functionality conditionally compiled out, reducing it's size. The front page (http://www.sqlite.org/) proclaims:
"Small code footprint: less than 250KiB fully configured or less than
 150KiB with optional features omitted."

YMMV. Your best bet is to choose the features you don't need, compile up your target library, and measure the code size yourself.


The original post asked about RAM requirements in an embedded environment. In embedded applications the code is normally stored in, and executed from, ROM of FLASH not RAM. The RAM requirements he is looking for are the stack space, heap space, and static variable storage requirements of SQLite when it is executing.

I haven't seen any details on these requirements anywhere in the documentation, but I could have missed it.

The stack and heap space requirements will depend upon the complexity of the queries you are executing. I would guess that the largest stack requirements would occur while compiling your queries, and the maximum heap requirements would occur while executing them (for things like temporary tables used by IN clauses etc). The static variable requirements should be fixed when your application is linked, and may depend upon which features you have compiled in or omitted.

I think you will probably have to determine these values experimentally.

HTH
Dennis Cote

Reply via email to