Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 322 for mmap (0.35 sec)

  1. src/cmd/go/internal/mmap/mmap.go

    // license that can be found in the LICENSE file.
    
    // This package is a lightly modified version of the mmap code
    // in github.com/google/codesearch/index.
    
    // The mmap package provides an abstraction for memory mapping files
    // on different platforms.
    package mmap
    
    import (
    	"os"
    )
    
    // Data is mmap'ed read-only data from a file.
    // The backing file is never closed, so Data
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 15 21:57:36 UTC 2023
    - 754 bytes
    - Viewed (0)
  2. src/runtime/mmap.go

    package runtime
    
    import "unsafe"
    
    // mmap calls the mmap system call. It is implemented in assembly.
    // We only pass the lower 32 bits of file offset to the
    // assembly routine; the higher bits (if required), should be provided
    // by the assembly routine as 0.
    // The err result is an OS error code such as ENOMEM.
    func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (p unsafe.Pointer, err int)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 844 bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/telemetry/internal/mmap/mmap.go

    // license that can be found in the LICENSE file.
    
    // This package is a lightly modified version of the mmap code
    // in github.com/google/codesearch/index.
    
    // The mmap package provides an abstraction for memory mapping files
    // on different platforms.
    package mmap
    
    import (
    	"os"
    )
    
    // The backing file is never closed, so Data
    // remains valid for the lifetime of the process.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 30 21:40:49 UTC 2024
    - 1002 bytes
    - Viewed (0)
  4. src/runtime/cgo/mmap.go

    import _ "unsafe"
    
    // When using cgo, call the C library for mmap, so that we call into
    // any sanitizer interceptors. This supports using the memory
    // sanitizer with Go programs. The memory sanitizer only applies to
    // C/C++ code; this permits that code to see the Go code as normal
    // program addresses that have been initialized.
    
    // To support interceptors that look for both mmap and munmap,
    // also call the C library for munmap.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 1K bytes
    - Viewed (0)
  5. src/runtime/runtime_mmap_test.go

    	}
    
    	// Mmap should fail at a half page into the buffer.
    	_, err = runtime.Mmap(unsafe.Pointer(uintptr(b)+ps/2), ps, 0, runtime.MAP_ANON|runtime.MAP_PRIVATE|runtime.MAP_FIXED, -1, 0)
    	if err == 0 {
    		t.Errorf("Mmap should have failed with half-page alignment %d, but succeeded: %v", ps/2, err)
    	}
    
    	// Mmap should succeed at a full page into the buffer.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  6. src/runtime/cgo_mmap.go

    //go:linkname _cgo_munmap _cgo_munmap
    var _cgo_munmap unsafe.Pointer
    
    // mmap is used to route the mmap system call through C code when using cgo, to
    // support sanitizer interceptors. Don't allow stack splits, since this function
    // (used by sysAlloc) is called in a lot of low-level parts of the runtime and
    // callers often assume it won't acquire any locks.
    //
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/telemetry/internal/mmap/mmap_unix.go

    //go:build unix && (!solaris || go1.20)
    
    package mmap
    
    import (
    	"fmt"
    	"io/fs"
    	"os"
    	"syscall"
    )
    
    func mmapFile(f *os.File, _ *Data) (Data, error) {
    	st, err := f.Stat()
    	if err != nil {
    		return Data{}, err
    	}
    	size := st.Size()
    	pagesize := int64(os.Getpagesize())
    	if int64(int(size+(pagesize-1))) != size+(pagesize-1) {
    		return Data{}, fmt.Errorf("%s: too large for mmap", f.Name())
    	}
    	n := int(size)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 30 21:40:49 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  8. src/runtime/mem_darwin.go

    func sysFaultOS(v unsafe.Pointer, n uintptr) {
    	mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE|_MAP_FIXED, -1, 0)
    }
    
    func sysReserveOS(v unsafe.Pointer, n uintptr) unsafe.Pointer {
    	p, err := mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
    	if err != 0 {
    		return nil
    	}
    	return p
    }
    
    const _ENOMEM = 12
    
    func sysMapOS(v unsafe.Pointer, n uintptr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 2K bytes
    - Viewed (0)
  9. src/cmd/link/internal/ld/outbuf_mmap.go

    // license that can be found in the LICENSE file.
    
    //go:build unix
    
    package ld
    
    import (
    	"syscall"
    )
    
    // Mmap maps the output file with the given size. It unmaps the old mapping
    // if it is already mapped. It also flushes any in-heap data to the new
    // mapping.
    func (out *OutBuf) Mmap(filesize uint64) (err error) {
    	oldlen := len(out.buf)
    	if oldlen != 0 {
    		out.munmap()
    	}
    
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:20:31 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  10. src/runtime/mem_linux.go

    // prevents us from allocating more stack.
    //
    //go:nosplit
    func sysAllocOS(n uintptr) unsafe.Pointer {
    	p, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
    	if err != 0 {
    		if err == _EACCES {
    			print("runtime: mmap: access denied\n")
    			exit(2)
    		}
    		if err == _EAGAIN {
    			print("runtime: mmap: too much locked memory (check 'ulimit -l').\n")
    			exit(2)
    		}
    		return nil
    	}
    	return p
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 5K bytes
    - Viewed (0)
Back to top