Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 97 for pmap (0.03 sec)

  1. src/runtime/race/race_linux_test.go

    	// doesn't fault. See issue 60825.
    
    	// Mmap two pages of memory, and make the second page inaccessible,
    	// so we have an address at the end of a page.
    	pagesize := syscall.Getpagesize()
    	b, err := syscall.Mmap(0, 0, 2*pagesize, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
    	if err != nil {
    		t.Fatalf("mmap failed %s", err)
    	}
    	defer syscall.Munmap(b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 16 14:09:02 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  2. src/runtime/export_mmap_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build unix
    
    // Export guts for testing.
    
    package runtime
    
    var Mmap = mmap
    var Munmap = munmap
    
    const ENOMEM = _ENOMEM
    const MAP_ANON = _MAP_ANON
    const MAP_PRIVATE = _MAP_PRIVATE
    const MAP_FIXED = _MAP_FIXED
    
    func GetPhysPageSize() uintptr {
    	return physPageSize
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 429 bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/telemetry/internal/mmap/mmap_other.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build (js && wasm) || wasip1 || plan9 || (solaris && !go1.20)
    
    package mmap
    
    import (
    	"io"
    	"os"
    )
    
    // mmapFile on other systems doesn't mmap the file. It just reads everything.
    func mmapFile(f *os.File, _ *Data) (Data, error) {
    	b, err := io.ReadAll(f)
    	if err != nil {
    		return Data{}, err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 30 21:40:49 UTC 2024
    - 540 bytes
    - Viewed (0)
  4. src/cmd/go/internal/mmap/mmap_other.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build (js && wasm) || wasip1 || plan9
    
    package mmap
    
    import (
    	"io"
    	"os"
    )
    
    // mmapFile on other systems doesn't mmap the file. It just reads everything.
    func mmapFile(f *os.File) (Data, error) {
    	b, err := io.ReadAll(f)
    	if err != nil {
    		return Data{}, err
    	}
    	return Data{f, b}, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 15 21:57:36 UTC 2023
    - 454 bytes
    - Viewed (0)
  5. src/syscall/linkname_unix.go

    //go:build unix
    
    package syscall
    
    import _ "unsafe" // for linkname
    
    // mmap should be an internal detail,
    // but widely used packages access it using linkname.
    // Notable members of the hall of shame include:
    //   - modernc.org/memory
    //   - github.com/ncruces/go-sqlite3
    //
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 532 bytes
    - Viewed (0)
  6. src/runtime/race/race_unix_test.go

    )
    
    // Test that race detector does not crash when accessing non-Go allocated memory (issue 9136).
    func TestNonGoMemory(t *testing.T) {
    	data, err := syscall.Mmap(-1, 0, 4096, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
    	if err != nil {
    		t.Fatalf("failed to mmap memory: %v", err)
    	}
    	defer syscall.Munmap(data)
    	p := (*uint32)(unsafe.Pointer(&data[0]))
    	atomic.AddUint32(p, 1)
    	(*p)++
    	if *p != 2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 09 15:36:26 UTC 2022
    - 762 bytes
    - Viewed (0)
  7. test/typeparam/orderedmap.go

    // Package orderedmap provides an ordered map, implemented as a binary tree.
    package main
    
    import (
    	"bytes"
    	"context"
    	"fmt"
    	"runtime"
    )
    
    type Ordered interface {
    	~int | ~int8 | ~int16 | ~int32 | ~int64 |
    		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
    		~float32 | ~float64 |
    		~string
    }
    
    // _Map is an ordered map.
    type _Map[K, V any] struct {
    	root    *node[K, V]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 7.1K bytes
    - Viewed (0)
  8. src/syscall/mmap_unix_test.go

    //go:build unix
    
    package syscall_test
    
    import (
    	"syscall"
    	"testing"
    )
    
    func TestMmap(t *testing.T) {
    	b, err := syscall.Mmap(-1, 0, syscall.Getpagesize(), syscall.PROT_NONE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
    	if err != nil {
    		t.Fatalf("Mmap: %v", err)
    	}
    	if err := syscall.Munmap(b); err != nil {
    		t.Fatalf("Munmap: %v", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 30 23:58:34 UTC 2022
    - 500 bytes
    - Viewed (0)
  9. test/live2.go

    func printnl()
    
    //go:noescape
    func useT40(*T40)
    
    type T40 struct {
    	m map[int]int
    }
    
    func newT40() *T40 {
    	ret := T40{}
    	ret.m = make(map[int]int, 42) // ERROR "live at call to makemap: &ret$"
    	return &ret
    }
    
    func bad40() {
    	t := newT40() // ERROR "stack object ret T40$" "stack object .autotmp_[0-9]+ runtime.hmap$"
    	printnl()     // ERROR "live at call to printnl: ret$"
    	useT40(t)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 23:29:33 UTC 2023
    - 953 bytes
    - Viewed (0)
  10. test/typeparam/slices.go

    func TestMap() {
    	s1 := []int{1, 2, 3}
    	s2 := _Map(s1, func(i int) float64 { return float64(i) * 2.5 })
    	if want := []float64{2.5, 5, 7.5}; !_Equal(s2, want) {
    		panic(fmt.Sprintf("_Map(%v, ...) = %v, want %v", s1, s2, want))
    	}
    
    	s3 := []string{"Hello", "World"}
    	s4 := _Map(s3, strings.ToLower)
    	if want := []string{"hello", "world"}; !_Equal(s4, want) {
    		panic(fmt.Sprintf("_Map(%v, strings.ToLower) = %v, want %v", s3, s4, want))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 7.8K bytes
    - Viewed (0)
Back to top