Hello worldwide Sqlite team!

We've found an issue caused by zeroblob initialization. Depending on the table 
columns creation order, zeroblob initialization causes huge memory allocation 
or not.

Attached sample project is for Mono, but we've tried the same scenario with 
native methods. In first case no additional memory is allocated, but in 
ZeroblobFail method approx 100Mb of memory is allocated for a quick period of 
zeroblob creation.

Could you please help to explain the behavior and provide possible workarounds?

Here is quote:
http://www.sqlite.org/c3ref/bind_blob.html
«The sqlite3_bind_zeroblob() routine binds a BLOB of length N that is filled 
with zeroes. A zeroblob uses a fixed amount of memory (just an integer to hold 
its size) while it is being processed. Zeroblobs are intended to serve as 
placeholders for BLOBs whose content is later written using incremental BLOB 
I/O<http://www.sqlite.org/c3ref/blob_open.html> routines»

Any advice would be great.

Thanks.

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

Reply via email to