This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients mboquien, neologix, pitrou, sbt
Date 2014-04-02.23:20:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1396480853.06.0.555216825765.issue21116@psf.upfronthosting.co.za>
In-reply-to
Content
Using truncate() to zero extend is not really portable: it is only guaranteed on XSI-compliant POSIX systems.

Also, the FreeBSD man page for mmap() has the following warning:

WARNING! Extending a file with ftruncate(2), thus creating a big
hole, and then filling the hole by modifying a shared mmap() can
lead to severe file fragmentation.  In order to avoid such
fragmentation you should always pre-allocate the file's backing
store by write()ing zero's into the newly extended area prior to
modifying the area via your mmap().  The fragmentation problem is
especially sensitive to MAP_NOSYNC pages, because pages may be
flushed to disk in a totally random order.
History
Date User Action Args
2014-04-02 23:20:53sbtsetrecipients: + sbt, pitrou, neologix, mboquien
2014-04-02 23:20:53sbtsetmessageid: <1396480853.06.0.555216825765.issue21116@psf.upfronthosting.co.za>
2014-04-02 23:20:53sbtlinkissue21116 messages
2014-04-02 23:20:52sbtcreate