Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 230 for mmmp (0.03 sec)

  1. test/recover4.go

    	debug.SetPanicOnFault(true)
    
    	size := syscall.Getpagesize()
    
    	// Map 16 pages of data with a 4-page hole in the middle.
    	data, err := syscall.Mmap(-1, 0, 16*size, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
    	if err != nil {
    		log.Fatalf("mmap: %v", err)
    	}
    
    	// Create a hole in the mapping that's PROT_NONE.
    	// Note that we can't use munmap here because the Go runtime
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  2. src/crypto/sha1/issue15617_test.go

    //go:build amd64 && (linux || darwin)
    
    package sha1_test
    
    import (
    	"crypto/sha1"
    	"syscall"
    	"testing"
    )
    
    func TestOutOfBoundsRead(t *testing.T) {
    	const pageSize = 4 << 10
    	data, err := syscall.Mmap(0, 0, 2*pageSize, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
    	if err != nil {
    		panic(err)
    	}
    	if err := syscall.Mprotect(data[pageSize:], syscall.PROT_NONE); err != nil {
    		panic(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 14 14:17:04 UTC 2022
    - 660 bytes
    - Viewed (0)
  3. src/cmd/internal/bio/buf.go

    	}
    	return data, false, nil
    }
    
    // SliceRO returns a slice containing the next length bytes of r
    // backed by a read-only mmap'd data. If the mmap cannot be
    // established (limit exceeded, region too small, etc) a nil slice
    // will be returned. If mmap succeeds, it will never be unmapped.
    func (r *Reader) SliceRO(length uint64) []byte {
    	data, ok := r.sliceOS(length)
    	if ok {
    		return data
    	}
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 11 17:15:15 UTC 2020
    - 3.1K bytes
    - Viewed (0)
  4. src/runtime/cgo/gcc_mmap.c

    #include <stdlib.h>
    #include <sys/mman.h>
    
    #include "libcgo.h"
    
    uintptr_t
    x_cgo_mmap(void *addr, uintptr_t length, int32_t prot, int32_t flags, int32_t fd, uint32_t offset) {
    	void *p;
    
    	_cgo_tsan_acquire();
    	p = mmap(addr, length, prot, flags, fd, offset);
    	_cgo_tsan_release();
    	if (p == MAP_FAILED) {
    		/* This is what the Go code expects on failure.  */
    		return (uintptr_t)errno;
    	}
    	return (uintptr_t)p;
    }
    
    void
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 916 bytes
    - Viewed (0)
  5. src/runtime/tagptr_64bit.go

    	// On AIX, 64-bit addresses are split into 36-bit segment number and 28-bit
    	// offset in segment.  Segment numbers in the range 0x0A0000000-0x0AFFFFFFF(LSA)
    	// are available for mmap.
    	// We assume all tagged addresses are from memory allocated with mmap.
    	// We use one bit to distinguish between the two ranges.
    	aixAddrBits = 57
    	aixTagBits  = 64 - aixAddrBits + 3
    
    	// riscv64 SV57 mode gives 56 bits of userspace VA.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 18 20:22:50 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go

    //go:build aix && ppc
    
    package unix
    
    //sysnb	Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
    //sys	Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
    
    //sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
    
    func setTimespec(sec, nsec int64) Timespec {
    	return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  7. src/runtime/debug/panic_test.go

    		t.Skip("iOS doesn't provide fault addresses")
    	}
    	if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm" {
    		t.Skip("netbsd-arm doesn't provide fault address (golang.org/issue/45026)")
    	}
    	m, err := syscall.Mmap(-1, 0, 0x1000, syscall.PROT_READ /* Note: no PROT_WRITE */, syscall.MAP_SHARED|syscall.MAP_ANON)
    	if err != nil {
    		t.Fatalf("can't map anonymous memory: %s", err)
    	}
    	defer syscall.Munmap(m)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 1.4K bytes
    - Viewed (0)
  8. src/cmd/go/internal/mmap/mmap_windows.go

    // Copyright 2011 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package mmap
    
    import (
    	"fmt"
    	"os"
    	"syscall"
    	"unsafe"
    
    	"internal/syscall/windows"
    )
    
    func mmapFile(f *os.File) (Data, error) {
    	st, err := f.Stat()
    	if err != nil {
    		return Data{}, err
    	}
    	size := st.Size()
    	if size == 0 {
    		return Data{f, nil}, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 15 21:57:36 UTC 2023
    - 1K bytes
    - Viewed (0)
  9. src/runtime/vdso_freebsd_x86.go

    	devPath[9] = digits[idx]
    
    	fd := open(&devPath[0], 0 /* O_RDONLY */ |_O_CLOEXEC, 0)
    	if fd < 0 {
    		atomic.Casuintptr(&hpetDevMap[idx], 0, ^uintptr(0))
    		return
    	}
    
    	addr, mmapErr := mmap(nil, physPageSize, _PROT_READ, _MAP_SHARED, fd, 0)
    	closefd(fd)
    	newP := uintptr(addr)
    	if mmapErr != 0 {
    		newP = ^uintptr(0)
    	}
    	if !atomic.Casuintptr(&hpetDevMap[idx], 0, newP) && mmapErr == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/sys/unix/syscall_unix.go

    		i = len(n)
    	}
    	return i
    }
    
    // Mmap manager, for use by operating system-specific implementations.
    
    type mmapper struct {
    	sync.Mutex
    	active map[*byte][]byte // active mappings; key is last byte in mapping
    	mmap   func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error)
    	munmap func(addr uintptr, length uintptr) error
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 16.5K bytes
    - Viewed (0)
Back to top