Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 275 for munmap (0.15 sec)

  1. src/cmd/vendor/golang.org/x/sys/unix/mremap.go

    import "unsafe"
    
    type mremapMmapper struct {
    	mmapper
    	mremap func(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error)
    }
    
    var mapper = &mremapMmapper{
    	mmapper: mmapper{
    		active: make(map[*byte][]byte),
    		mmap:   mmap,
    		munmap: munmap,
    	},
    	mremap: mremap,
    }
    
    func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/telemetry/internal/mmap/mmap.go

    	f    *os.File
    	Data []byte
    	// Some windows magic
    	Windows interface{}
    }
    
    // Mmap maps the given file into memory.
    // When remapping a file, pass the most recently returned Data.
    func Mmap(f *os.File, data *Data) (Data, error) {
    	return mmapFile(f, data)
    }
    
    // Munmap unmaps the given file from memory.
    func Munmap(d *Data) error {
    	// d.f.Close() on Windows still gets an error
    	return munmapFile(*d)
    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/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)
  4. src/runtime/mmap.go

    // munmap calls the munmap system call. It is implemented in assembly.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 844 bytes
    - Viewed (0)
  5. src/cmd/link/internal/ld/outbuf_mmap.go

    //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 {
    		if err = out.fallocate(filesize); err != syscall.EINTR {
    			break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:20:31 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/sys/unix/mmap_nomremap.go

    // license that can be found in the LICENSE file.
    
    //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos
    
    package unix
    
    var mapper = &mmapper{
    	active: make(map[*byte][]byte),
    	mmap:   mmap,
    	munmap: munmap,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 22:18:42 UTC 2024
    - 343 bytes
    - Viewed (0)
  7. src/runtime/cgo/gcc_mmap.c

    	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
    x_cgo_munmap(void *addr, uintptr_t length) {
    	int r;
    
    	_cgo_tsan_acquire();
    	r = munmap(addr, length);
    	_cgo_tsan_release();
    	if (r < 0) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 916 bytes
    - Viewed (0)
  8. 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)
  9. src/cmd/vendor/golang.org/x/telemetry/internal/mmap/mmap_unix.go

    	data, err := syscall.Mmap(int(f.Fd()), 0, mmapLength, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_SHARED)
    	if err != nil {
    		return Data{}, &fs.PathError{Op: "mmap", Path: f.Name(), Err: err}
    	}
    	return Data{f, data[:n], nil}, nil
    }
    
    func munmapFile(d Data) error {
    	if len(d.Data) == 0 {
    		return nil
    	}
    	err := syscall.Munmap(d.Data)
    	if err != nil {
    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/cgo_mmap.go

    // sysMunmap calls the munmap system call. It is implemented in assembly.
    func sysMunmap(addr unsafe.Pointer, n uintptr)
    
    // callCgoMunmap calls the munmap function in the runtime/cgo package
    // using the GCC calling convention. It is implemented in assembly.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 2.4K bytes
    - Viewed (0)
Back to top