syscall.Getpagesize(): add test, implement for Linux and Windows

This commit is contained in:
Dan Kegel
2022-06-10 17:20:54 -07:00
committed by Ayke
parent caf405b01d
commit 8754f64f3b
10 changed files with 77 additions and 8 deletions
+8
View File
@@ -40,3 +40,11 @@ func markGlobals() {
start = (start + unsafe.Alignof(uintptr(0)) - 1) &^ (unsafe.Alignof(uintptr(0)) - 1) // align on word boundary
markRoots(start, end)
}
//export getpagesize
func libc_getpagesize() int
//go:linkname syscall_Getpagesize syscall.Getpagesize
func syscall_Getpagesize() int {
return libc_getpagesize()
}