diff --git a/otherlibs/bigarray/mmap_win32.c b/otherlibs/bigarray/mmap_win32.c index 3a64e7b67..cac8159df 100644 --- a/otherlibs/bigarray/mmap_win32.c +++ b/otherlibs/bigarray/mmap_win32.c @@ -129,7 +129,7 @@ void caml_ba_unmap_file(void * addr, uintnat len) uintnat delta; GetSystemInfo(&sysinfo); - delta = (uintnat) (startpos % sysinfo.dwPageSize); + delta = (uintnat) addr % sysinfo.dwPageSize; UnmapViewOfFile((void *)((uintnat)addr - delta)); }