Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

Fix Windows mmap sizing. #218

Merged
merged 1 commit into from
Jul 10, 2014
Merged

Fix Windows mmap sizing. #218

merged 1 commit into from
Jul 10, 2014

Conversation

benbjohnson
Copy link
Member

Overview

This commit fixes an issue on Windows where the database was doubling when it was re-opened. This occurred because Windows has to truncate the file to the mmap size and the mmap resizing code was doubling the size whenever the DB size was at the next threshold. This has been changed so that the DB size will double only when the DB size is above the next threshold.

Fixes #216

/cc @rusco @natefinch

This commit fixes an issue on Windows where the database was doubling
when it was re-opened. This occurred because Windows has to truncate the
file to the mmap size and the mmap resizing code was doubling the size
whenever the DB size was at the next threshold. This has been changed so
that the DB size will double only when the DB size is above the next
threshold.
@benbjohnson
Copy link
Member Author

benbjohnson added a commit that referenced this pull request Jul 10, 2014
@benbjohnson benbjohnson merged commit ca5f582 into boltdb:master Jul 10, 2014
@benbjohnson benbjohnson deleted the fix-win branch July 10, 2014 13:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DB size increase on windows
1 participant