github.com/Rookout/GoSDK@v0.1.48/pkg/services/protector/mprotect.go (about) 1 package protector 2 3 import "syscall" 4 5 6 func GetPageStart(addr uintptr) uintptr { 7 return addr & (^uintptr(syscall.Getpagesize() - 1)) 8 } 9 10 11 func GetPageEnd(addr uintptr) uintptr { 12 return GetPageStart(addr) + uintptr(syscall.Getpagesize()) 13 }