Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 269 for Munmap (0.11 sec)

  1. src/runtime/runtime_mmap_test.go

    	if err != 0 {
    		t.Fatalf("Mmap: %v", err)
    	}
    
    	if runtime.GOOS == "aix" {
    		// AIX does not allow mapping a range that is already mapped.
    		runtime.Munmap(unsafe.Pointer(uintptr(b)), 2*ps)
    	}
    
    	// 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)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  2. src/syscall/syscall_bsd.go

    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)
    }
    
    func Munmap(b []byte) (err error) {
    	return mapper.Munmap(b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 07 10:34:48 UTC 2023
    - 13.6K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/sys/unix/syscall_unix.go

    	return b, nil
    }
    
    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.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 16.5K bytes
    - Viewed (0)
  4. src/runtime/mem_bsd.go

    }
    
    // Don't split the stack as this function may be invoked without a valid G,
    // which prevents us from allocating more stack.
    //
    //go:nosplit
    func sysFreeOS(v unsafe.Pointer, n uintptr) {
    	munmap(v, n)
    }
    
    func sysFaultOS(v unsafe.Pointer, n uintptr) {
    	mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE|_MAP_FIXED, -1, 0)
    }
    
    // Indicates not to reserve swap space for the mapping.
    const _sunosMAP_NORESERVE = 0x40
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  5. src/syscall/syscall_solaris.go

    	return
    }
    
    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)
    }
    
    func Munmap(b []byte) (err error) {
    	return mapper.Munmap(b)
    }
    
    func Utimes(path string, tv []Timeval) error {
    	if len(tv) != 2 {
    		return EINVAL
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  6. src/runtime/mem_aix.go

    }
    
    // Don't split the stack as this function may be invoked without a valid G,
    // which prevents us from allocating more stack.
    //
    //go:nosplit
    func sysFreeOS(v unsafe.Pointer, n uintptr) {
    	munmap(v, n)
    }
    
    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 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 2K bytes
    - Viewed (0)
  7. src/syscall/syscall_aix.go

    	mmap:   mmap,
    	munmap: munmap,
    }
    
    //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)
    
    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)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 13:50:55 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  8. src/internal/fuzz/sys_posix.go

    	// os.File.Close may fail due to I/O errors, but we still want to delete
    	// the temporary file.
    	var errs []error
    	errs = append(errs,
    		syscall.Munmap(m.region),
    		m.f.Close())
    	if m.removeOnClose {
    		errs = append(errs, os.Remove(m.f.Name()))
    	}
    	for _, err := range errs {
    		if err != nil {
    			return err
    		}
    	}
    	return nil
    }
    
    // setWorkerComm configures communication channels on the cmd that will
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 12 19:47:40 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  9. test/recover4.go

    	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
    	// could create a mapping that ends up in this hole otherwise,
    	// invalidating the test.
    	hole := data[len(data)/2 : 3*(len(data)/4)]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  10. src/runtime/sys_openbsd2.go

    	KeepAlive(addr) // Just for consistency. Hopefully addr is not a Go address.
    	return args.ret1, args.ret2
    }
    func mmap_trampoline()
    
    //go:nosplit
    //go:cgo_unsafe_args
    func munmap(addr unsafe.Pointer, n uintptr) {
    	libcCall(unsafe.Pointer(abi.FuncPCABI0(munmap_trampoline)), unsafe.Pointer(&addr))
    	KeepAlive(addr) // Just for consistency. Hopefully addr is not a Go address.
    }
    func munmap_trampoline()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top