MmAllocateContiguousMemory always allocates via VirtualAlloc, which on POSIX is mmap. MmFreeContiguousMemory picks its deallocator by asking VirtualQuery whether mbi.AllocationBase == BaseAddress. The POSIX VirtualQuery hardcodes AllocationBase = NULL. The comment says so outright: /* != address -> freed via _aligned_free */.
`_aligned_free(ptr) { free(ptr); }`
So the branch is unreachable in the VirtualFree direction, and every contiguous-memory alloc/free pair hands an mmap'd pointer to free().