[Date Prev][Date Next] [Chronological] [Thread] [Top]

Fwd: [Patch] Allocating sparse files on Windows

Apologies if this arrives twice, I sent it once two days ago before subscribing to the list and it hasn't appeared yet so I'm resending after subscribing.

Memory mapping files on Windows requires the file size to match the size of the memory mapped region however in the current implementation this requires creating a file the full size of the environment which may be much larger than the actual amount of data in the database.

This patch creates the database as a sparse file on Windows.  Windows Explorer will report the file size as the size of the entire memory mapped region but the size on disk will be proportional to the size of committed data in the database.  This can be checked by checking the "size on disk" property of the file.

Let me know if this is posted incorrectly, otherwise feel free to modify the patch in whatever way is necessary for approval.

Attachment: 0001-Allocating-sparse-files-on-windows.patch
Description: Binary data