Summary: Because MSVC would try to calculate the mmapLength as a long value, which isn't correct, and MSVC issues multiple warnings if you try to do it.
Closes #289
Reviewed By: @yfeldblum
Differential Revision:
D2419061
Pulled By: @JoelMarcey
, globalHead_(TaggedPtr{})
{
const size_t needed = sizeof(Slot) * (actualCapacity_ + 1);
- long pagesize = sysconf(_SC_PAGESIZE);
+ size_t pagesize = sysconf(_SC_PAGESIZE);
mmapLength_ = ((needed - 1) & ~(pagesize - 1)) + pagesize;
assert(needed <= mmapLength_ && mmapLength_ < needed + pagesize);
assert((mmapLength_ % pagesize) == 0);