Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 73 for mmap64 (0.09 sec)

  1. 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)
  2. src/cmd/internal/bio/buf_mmap.go

    	if length < threshold {
    		return nil, false
    	}
    
    	// Have we reached the mmap limit?
    	if atomic.AddInt32(&mmapLimit, -1) < 0 {
    		atomic.AddInt32(&mmapLimit, 1)
    		return nil, false
    	}
    
    	// Page-align the offset.
    	off := r.Offset()
    	align := syscall.Getpagesize()
    	aoff := off &^ int64(align-1)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:20:31 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. src/cmd/link/internal/ld/main.go

    	// for which we have computed the size and offset, in a
    	// mmap'd region. The second part writes more content, for
    	// 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)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:59:50 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  4. 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)
  5. src/cmd/link/internal/ld/outbuf_mmap.go

    // license that can be found in the LICENSE file.
    
    //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 {
    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/runtime/mem_linux.go

    // prevents us from allocating more stack.
    //
    //go:nosplit
    func sysAllocOS(n uintptr) unsafe.Pointer {
    	p, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
    	if err != 0 {
    		if err == _EACCES {
    			print("runtime: mmap: access denied\n")
    			exit(2)
    		}
    		if err == _EAGAIN {
    			print("runtime: mmap: too much locked memory (check 'ulimit -l').\n")
    			exit(2)
    		}
    		return nil
    	}
    	return p
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. 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)
  8. src/cmd/vendor/golang.org/x/telemetry/internal/mmap/mmap_other.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build (js && wasm) || wasip1 || plan9 || (solaris && !go1.20)
    
    package mmap
    
    import (
    	"io"
    	"os"
    )
    
    // mmapFile on other systems doesn't mmap the file. It just reads everything.
    func mmapFile(f *os.File, _ *Data) (Data, error) {
    	b, err := io.ReadAll(f)
    	if err != nil {
    		return Data{}, err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 30 21:40:49 UTC 2024
    - 540 bytes
    - Viewed (0)
  9. src/syscall/linkname_unix.go

    //go:build unix
    
    package syscall
    
    import _ "unsafe" // for linkname
    
    // mmap should be an internal detail,
    // but widely used packages access it using linkname.
    // Notable members of the hall of shame include:
    //   - modernc.org/memory
    //   - github.com/ncruces/go-sqlite3
    //
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 532 bytes
    - Viewed (0)
  10. 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)
Back to top