Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 246 for mmap64 (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/cmd/go/internal/mmap/mmap_unix.go

    //go:build unix
    
    package mmap
    
    import (
    	"fmt"
    	"io/fs"
    	"os"
    	"syscall"
    )
    
    func mmapFile(f *os.File) (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)
    	if n == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 15 21:57:36 UTC 2023
    - 886 bytes
    - Viewed (0)
  3. src/runtime/mem_aix.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: Tue Aug 22 19:05:10 UTC 2023
    - 2K bytes
    - Viewed (0)
  4. src/runtime/race/race_linux_test.go

    	// doesn't fault. See issue 60825.
    
    	// Mmap two pages of memory, and make the second page inaccessible,
    	// so we have an address at the end of a page.
    	pagesize := syscall.Getpagesize()
    	b, err := syscall.Mmap(0, 0, 2*pagesize, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
    	if err != nil {
    		t.Fatalf("mmap failed %s", err)
    	}
    	defer syscall.Munmap(b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 16 14:09:02 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  5. src/runtime/minmax.go

    		return y
    	}
    	return x
    }
    
    func fmin32(x, y float32) float32 { return fmin(x, y) }
    func fmin64(x, y float64) float64 { return fmin(x, y) }
    func fmax32(x, y float32) float32 { return fmax(x, y) }
    func fmax64(x, y float64) float64 { return fmax(x, y) }
    
    type floaty interface{ ~float32 | ~float64 }
    
    func fmin[F floaty](x, y F) F {
    	if y != y || y < x {
    		return y
    	}
    	if x != x || x < y || x != 0 {
    		return x
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 18:15:22 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. src/cmd/go/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
    
    package mmap
    
    import (
    	"io"
    	"os"
    )
    
    // mmapFile on other systems doesn't mmap the file. It just reads everything.
    func mmapFile(f *os.File) (Data, error) {
    	b, err := io.ReadAll(f)
    	if err != nil {
    		return Data{}, err
    	}
    	return Data{f, b}, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 15 21:57:36 UTC 2023
    - 454 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/runtime/race/race_unix_test.go

    )
    
    // Test that race detector does not crash when accessing non-Go allocated memory (issue 9136).
    func TestNonGoMemory(t *testing.T) {
    	data, err := syscall.Mmap(-1, 0, 4096, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
    	if err != nil {
    		t.Fatalf("failed to mmap memory: %v", err)
    	}
    	defer syscall.Munmap(data)
    	p := (*uint32)(unsafe.Pointer(&data[0]))
    	atomic.AddUint32(p, 1)
    	(*p)++
    	if *p != 2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 09 15:36:26 UTC 2022
    - 762 bytes
    - Viewed (0)
Back to top