Here, We will learn how to get the underlying memory page size of system in go. We can do it by using Getpagesize() function in os package in go golang.
Function prototype:
func Getpagesize() int
Return value:
Getpagesize() function in os package returns
the underlying system's memory page size.
Example with code:
package main
import "fmt"
import "os"
func main() {
ps := os.Getpagesize()
fmt.Println(ps)
}
Output:
4096
To learn more about golang, Please refer given below link:
https://techieindoor.com/go-lang-tutorial/
References:
https://golang.org/doc/
https://golang.org/pkg/