edsrzf / mmap-go

A portable mmap package for Go
BSD 3-Clause "New" or "Revised" License
938 stars 129 forks source link

explicit error when MapRegion offset is not multiple of pagesize #13

Closed huydx closed 7 years ago

huydx commented 7 years ago

When start offset is not multiple of pagesize, it will still success at mapping, but will fail by invalid argument when unmap, which is not help user to debug.

huydx commented 7 years ago

thanks for comment, fixed using errors.New @edsrzf

edsrzf commented 7 years ago

Thanks again! I should get some kind of builder/test runner going on here to catch those silly mistakes. I could have easily missed it in my review as well.