SQLite - Amalgamated Size

In my earlier post (SQLite - Embedable Database), I mentioned that a SQLite program takes about 26kB. This is not entirely true, since I think I had forgotten the exact nature of the linker.

The excutable program that resulted when I compiled and linked the test program, I had to use the -lsqlite3. The library resided in my system, and I am not sure if it was packaged into the resulting executable object. To check how much SQLite really took in terms of space, I got the SQLite3 Amalgamated source code, got the sqlite3.c and sqlite3.h into the test project and recompiled it.

The resulting program is 938779 bytes (~917kB), still less than 1MB. Not sure if I can calculate this way, but the SQLite3 takes about 891kB when embedded into a program. I think it also depends on the compiling and linking environment, but I am not sure of that.

Subscribe

Sponsors