]> Cypherpunks repositories - gostls13.git/commitdiff
Define os.PageSize and syscall.PageSize.
authorDavid Symonds <dsymonds@golang.org>
Wed, 3 Jun 2009 10:25:34 +0000 (03:25 -0700)
committerDavid Symonds <dsymonds@golang.org>
Wed, 3 Jun 2009 10:25:34 +0000 (03:25 -0700)
R=rsc
APPROVED=rsc
DELTA=13  (13 added, 0 deleted, 0 changed)
OCL=29429
CL=29819

src/lib/os/types.go
src/lib/syscall/syscall_darwin_amd64.go
src/lib/syscall/syscall_linux_amd64.go

index 73363f453454301add87d4989b9071a684c0fa3b..b5db86660634be5251d624067b2a555251bd1b56 100644 (file)
@@ -9,6 +9,11 @@ import "syscall"
 // An operating-system independent representation of Unix data structures.
 // OS-specific routines in this directory convert the OS-local versions to these.
 
+// Getpagesize returns the underlying system's memory page size.
+func Getpagesize() int{
+       return syscall.Getpagesize()
+}
+
 // A Dir describes a file and is returned by Stat, Fstat, and Lstat
 type Dir struct {
        Dev     uint64; // device number of file system holding file.
index 31e91cda36eda3be0952e69fec622f100ce866d1..86202322306963b486f1469797391fee4f7983ab 100644 (file)
@@ -6,6 +6,10 @@ package syscall
 
 import "syscall"
 
+func Getpagesize() int {
+       return 4096
+}
+
 func TimespecToNsec(ts Timespec) int64 {
        return int64(ts.Sec)*1e9 + int64(ts.Nsec);
 }
index 8b3404d3e336dbb7f6a5f274f6234deb4cf896ed..24426405beb66eea137ce9ffc91a1bd019e6057f 100644 (file)
@@ -6,6 +6,10 @@ package syscall
 
 import "syscall"
 
+func Getpagesize() int {
+       return 4096
+}
+
 func TimespecToNsec(ts Timespec) int64 {
        return int64(ts.Sec)*1e9 + int64(ts.Nsec);
 }