Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 109 for munmap (0.11 sec)

  1. src/syscall/syscall_unix.go

    }
    
    func (m *mmapper) Munmap(data []byte) (err error) {
    	if len(data) == 0 || len(data) != cap(data) {
    		return EINVAL
    	}
    
    	// Find the base of the mapping.
    	p := &data[cap(data)-1]
    	m.Lock()
    	defer m.Unlock()
    	b := m.active[p]
    	if b == nil || &b[0] != &data[0] {
    		return EINVAL
    	}
    
    	// Unmap the memory and update m.
    	if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil {
    		return errno
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 16:19:26 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. src/runtime/mem_linux.go

    		// Since Linux 3.18, support for madvise is optional.
    		// Fall back on mmap if it's not supported.
    		// _MAP_ANON|_MAP_FIXED|_MAP_PRIVATE will unmap all the
    		// pages in the old mapping, and remap the memory region.
    		mmap(v, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_FIXED|_MAP_PRIVATE, -1, 0)
    	}
    
    	if debug.harddecommit > 0 {
    		p, err := mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_FIXED|_MAP_PRIVATE, -1, 0)
    		if p != v || err != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/telemetry/internal/counter/file.go

    		// bump start to next page
    		start = round(limit, pageSize)
    	}
    	return start, start + n
    }
    
    var memmap = mmap.Mmap
    var munmap = mmap.Munmap
    
    func (m *mappedFile) close() {
    	m.closeOnce.Do(func() {
    		if m.mapping != nil {
    			munmap(m.mapping)
    			m.mapping = nil
    		}
    		if m.f != nil {
    			m.f.Close() // best effort
    			m.f = nil
    		}
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  4. src/runtime/os3_solaris.go

    //go:cgo_import_dynamic libc_kill kill "libc.so"
    //go:cgo_import_dynamic libc_madvise madvise "libc.so"
    //go:cgo_import_dynamic libc_malloc malloc "libc.so"
    //go:cgo_import_dynamic libc_mmap mmap "libc.so"
    //go:cgo_import_dynamic libc_munmap munmap "libc.so"
    //go:cgo_import_dynamic libc_open open "libc.so"
    //go:cgo_import_dynamic libc_pthread_attr_destroy pthread_attr_destroy "libc.so"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  5. src/syscall/syscall_linux.go

    // mmap varies by architecture; see syscall_linux_*.go.
    //sys	munmap(addr uintptr, length uintptr) (err error)
    
    var mapper = &mmapper{
    	active: make(map[*byte][]byte),
    	mmap:   mmap,
    	munmap: munmap,
    }
    
    func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
    	return mapper.Mmap(fd, offset, length, prot, flags)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:12:46 UTC 2024
    - 35.7K bytes
    - Viewed (0)
  6. src/runtime/sys_darwin.go

    	}
    	return
    }
    func osinit_hack_trampoline()
    
    // mmap is used to do low-level memory allocation via mmap. 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
    func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (unsafe.Pointer, int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

      const void* const address;
      const uint64_t length;
    } PosixMemoryRegion;
    
    static void Cleanup(TF_ReadOnlyMemoryRegion* region) {
      auto r = static_cast<PosixMemoryRegion*>(region->plugin_memory_region);
      munmap(const_cast<void*>(r->address), r->length);
      delete r;
    }
    
    static const void* Data(const TF_ReadOnlyMemoryRegion* region) {
      auto r = static_cast<PosixMemoryRegion*>(region->plugin_memory_region);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Mar 24 20:08:23 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  8. src/syscall/syscall_darwin.go

    //sys	Unmount(path string, flags int) (err error)
    //sys	write(fd int, p []byte) (n int, err error)
    //sys	writev(fd int, iovecs []Iovec) (cnt uintptr, err error)
    //sys   mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
    //sys   munmap(addr uintptr, length uintptr) (err error)
    //sysnb fork() (pid int, err error)
    //sysnb execve(path *byte, argv **byte, envp **byte) (err error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 11K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go

    func Madvise(b []byte, advice int) (err error) {
    	return
    }
    
    func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
    	return mapper.Mmap(fd, offset, length, prot, flags)
    }
    
    func Munmap(b []byte) (err error) {
    	return mapper.Munmap(b)
    }
    
    //sys   Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A
    //sysnb	Getgid() (gid int)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:12:58 UTC 2024
    - 84.4K bytes
    - Viewed (0)
  10. src/cmd/link/internal/ld/main.go

    	// which we don't know the size.
    	if ctxt.Arch.Family != sys.Wasm {
    		// Don't mmap if we're building for Wasm. Wasm file
    		// layout is very different so filesize is meaningless.
    		if err := ctxt.Out.Mmap(filesize); err != nil {
    			Exitf("mapping output file failed: %v", err)
    		}
    	}
    	// asmb will redirect symbols to the output file mmap, and relocations
    	// will be applied directly there.
    	bench.Start("Asmb")
    	asmb(ctxt)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:59:50 UTC 2024
    - 16.6K bytes
    - Viewed (0)
Back to top