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

Re: Fwd: [Patch] Allocating sparse files on Windows



Colin LeMahieu wrote:
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.

Thanks, but as noted on http://www.openldap.org/devel/contributing.html patches should be submitted to the ITS.

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.



--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/