You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C#] FileMappedResizableDirectMemory over-reserves when reopening a page-aligned file #96
This always adds one more block, even when size is already a multiple of minimumReservedCapacity. Each reopen grows the file by one page. This is the C# twin of the C++ "TODO: cringe" (#87).
Reopen an 8192-byte file with the default minimum (4096):
actual: UsedCapacity = 8192, ReservedCapacity = 12288, and the file is grown to 12288 bytes;
expected (mem-rs FileMapped): capacity rounded up to whole pages, i.e. 8192.
Proposed solution
Use RoundUp(max(size, minimumReservedCapacity), pageSize), for example ((size + page - 1) / page) * page with overflow checks. Do the same in C++ (#87). Add regression tests for sizes 0, 1, page-1, page, page+1 and 2·page.
Activity
Triage issue #94: create follow-up issues, dependencies and sub-issues