github.com/hlts2/go@v0.0.0-20170904000733-812b34efaed8/src/runtime/export_mmap_test.go (about)

     1  // Copyright 2016 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
     6  
     7  // Export guts for testing.
     8  
     9  package runtime
    10  
    11  var Mmap = mmap
    12  var Munmap = munmap
    13  
    14  const ENOMEM = _ENOMEM
    15  const MAP_ANON = _MAP_ANON
    16  const MAP_PRIVATE = _MAP_PRIVATE
    17  const MAP_FIXED = _MAP_FIXED
    18  
    19  func GetPhysPageSize() uintptr {
    20  	return physPageSize
    21  }