Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 209 for munmap (0.1 sec)

  1. src/cmd/link/internal/ld/outbuf_nommap.go

    //go:build !unix && !windows
    
    package ld
    
    // Mmap allocates an in-heap output buffer with the given size. It copies
    // any old data (if any) to the new buffer.
    func (out *OutBuf) Mmap(filesize uint64) error {
    	// We need space to put all the symbols before we apply relocations.
    	oldheap := out.heap
    	if filesize < uint64(len(oldheap)) {
    		panic("mmap size too small")
    	}
    	out.heap = make([]byte, filesize)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:20:31 UTC 2024
    - 660 bytes
    - Viewed (0)
  2. src/runtime/vdso_freebsd_x86.go

    	if fd < 0 {
    		atomic.Casuintptr(&hpetDevMap[idx], 0, ^uintptr(0))
    		return
    	}
    
    	addr, mmapErr := mmap(nil, physPageSize, _PROT_READ, _MAP_SHARED, fd, 0)
    	closefd(fd)
    	newP := uintptr(addr)
    	if mmapErr != 0 {
    		newP = ^uintptr(0)
    	}
    	if !atomic.Casuintptr(&hpetDevMap[idx], 0, newP) && mmapErr == 0 {
    		munmap(addr, physPageSize)
    	}
    }
    
    //go:nosplit
    func (th *vdsoTimehands) getTimecounter() (uint32, bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  3. src/runtime/mem_darwin.go

    // 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 {
    	p, err := mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
    	if err != 0 {
    		return nil
    	}
    	return p
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 2K bytes
    - Viewed (0)
  4. 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)
  5. src/cmd/vendor/golang.org/x/sys/unix/syscall_unix.go

    		return errno
    	}
    	delete(m.active, p)
    	return nil
    }
    
    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 Read(fd int, p []byte) (n int, err error) {
    	n, err = read(fd, p)
    	if raceenabled {
    		if n > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 16.5K bytes
    - Viewed (0)
  6. 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)
  7. 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 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  8. src/runtime/mem_aix.go

    // 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 {
    	p, err := mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
    	if err != 0 {
    		return nil
    	}
    	return p
    }
    
    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/syscall/syscall_aix.go

    var mapper = &mmapper{
    	active: make(map[*byte][]byte),
    	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)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 13:50:55 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  10. test/recover4.go

    	// Map 16 pages of data with a 4-page hole in the middle.
    	data, err := syscall.Mmap(-1, 0, 16*size, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
    	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,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 2.2K bytes
    - Viewed (0)
Back to top