On 24 Jan 2012, at 6:43am, David Henry wrote:

> I am working without an operating system so there are no other agents trying
> to steal data.

You're writing an operating system ?  That can be lots of fun.  Good luck.

> Bearing that in mind, is it still necessary to actually write
> zero data to the sectors allocated? Is SQLite expecting it?

I haven't looked though the code with that in mind, but as far as I know, 
SQLite does not make any assumption about what will be in newly-assigned 
sectors.  If it wants zeros there it'll write them itself.

It is ftruncate itself which chooses to write zeros to any newly-assigned pages 
of disk space.  This is part of the specification of ftruncate, and documented 
here:

<http://pubs.opengroup.org/onlinepubs/007908799/xsh/ftruncate.html>

If your version of ftruncate doesn't write the zeros, you haven't implemented 
ftruncate properly.  But if you're not trying to reproduce UNIX, I guess it 
doesn't matter.

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

Reply via email to