edsrzf/mmap-go

some question about the function of MapRegion

planktonzp opened this issue · 1 comments

why the offset must be a multiple of the system's page size? I'm a fresher ,maybe the question is stupid but if you can gave me a explanation I'll be very grateful. Have a nice day

This is a requirement for many POSIX operating systems. See: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html

Most implementations require that off and addr are multiples of the page size as returned by sysconf().