Several map implementations require that map calls provide a page
aligned size.
Reviewed By: fmayer
Differential Revision: https://reviews.llvm.org/D141630
AllocationRingBufferSize = 1;
MapPlatformData Data = {};
RawRingBuffer = static_cast<char *>(
- map(/*Addr=*/nullptr, ringBufferSizeInBytes(AllocationRingBufferSize),
+ map(/*Addr=*/nullptr,
+ roundUpTo(ringBufferSizeInBytes(AllocationRingBufferSize), getPageSizeCached()),
"AllocatorRingBuffer", /*Flags=*/0, &Data));
auto *RingBuffer = reinterpret_cast<AllocationRingBuffer *>(RawRingBuffer);
RingBuffer->Size = AllocationRingBufferSize;