Skip to content

Commit

Permalink
Fix alignment for munmap
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed Jul 24, 2022
1 parent c5b2be4 commit 45f3a48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/coreclr/gc/unix/gcenv.unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,11 @@ void GCToOSInterface::YieldThread(uint32_t switchCount)
static void* VirtualReserveInner(size_t size, size_t alignment, uint32_t flags, uint32_t hugePagesFlag = 0)
{
assert(!(flags & VirtualReserveFlags::WriteWatch) && "WriteWatch not supported on Unix");
#if defined(HOST_ARM64) && defined(TARGET_OSX)
if (alignment < OS_PAGE_SIZE)
#else
if (alignment == 0)
#endif
{
alignment = OS_PAGE_SIZE;
}
Expand Down

0 comments on commit 45f3a48

Please sign in to comment.