Skip to content

Commit 45f3a48

Browse files
committed
Fix alignment for munmap
1 parent c5b2be4 commit 45f3a48

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/coreclr/gc/unix/gcenv.unix.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,11 @@ void GCToOSInterface::YieldThread(uint32_t switchCount)
639639
static void* VirtualReserveInner(size_t size, size_t alignment, uint32_t flags, uint32_t hugePagesFlag = 0)
640640
{
641641
assert(!(flags & VirtualReserveFlags::WriteWatch) && "WriteWatch not supported on Unix");
642+
#if defined(HOST_ARM64) && defined(TARGET_OSX)
643+
if (alignment < OS_PAGE_SIZE)
644+
#else
642645
if (alignment == 0)
646+
#endif
643647
{
644648
alignment = OS_PAGE_SIZE;
645649
}

0 commit comments

Comments
 (0)