Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 269 for mmat (0.85 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/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)
  3. 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)
  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/cgo/gcc_mmap.c

    #include <errno.h>
    #include <stdint.h>
    #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) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 916 bytes
    - Viewed (0)
  6. src/runtime/testdata/testprogcgo/sigstack.go

    #include <stdio.h>
    #include <stdlib.h>
    #include <sys/mman.h>
    
    #ifdef _AIX
    // On AIX, SIGSTKSZ is too small to handle Go sighandler.
    #define CSIGSTKSZ 0x4000
    #else
    #define CSIGSTKSZ SIGSTKSZ
    #endif
    
    extern void SigStackCallback();
    
    static void* WithSigStack(void* arg __attribute__((unused))) {
    	// Set up an alternate system stack.
    	void* base = mmap(0, CSIGSTKSZ, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top