- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 115 for mmap (0.04 sec)
-
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) -
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) -
src/cmd/link/internal/ld/fallocate_test.go
} if err != nil { t.Fatalf("fallocate failed: %v", err) } break } // Mmap 1 MiB initially, and grow to 2 and 3 MiB. // Check if the file size and disk usage is expected. for _, sz := range []int64{1 << 20, 2 << 20, 3 << 20} { err = out.Mmap(uint64(sz)) if err != nil { t.Fatalf("Mmap failed: %v", err) } stat, err := os.Stat(filename) if err != nil { t.Fatalf("Stat failed: %v", err)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 05 14:17:36 UTC 2023 - 1.7K bytes - Viewed (0) -
src/syscall/mmap_unix_test.go
//go:build unix package syscall_test import ( "syscall" "testing" ) func TestMmap(t *testing.T) { b, err := syscall.Mmap(-1, 0, syscall.Getpagesize(), syscall.PROT_NONE, syscall.MAP_ANON|syscall.MAP_PRIVATE) if err != nil { t.Fatalf("Mmap: %v", err) } if err := syscall.Munmap(b); err != nil { t.Fatalf("Munmap: %v", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 30 23:58:34 UTC 2022 - 500 bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/sigstack.go
#include <stdio.h> #include <stdlib.h> #include <sys/mman.h> #ifdef _AIX // On AIX, SIGSTKSZ is too small to handle Go sighandler. #define CSIGSTKSZ 0x4000 #else #define CSIGSTKSZ SIGSTKSZ #endif extern void SigStackCallback(); static void* WithSigStack(void* arg __attribute__((unused))) { // Set up an alternate system stack. void* base = mmap(0, CSIGSTKSZ, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 2.1K bytes - Viewed (0) -
src/cmd/internal/bio/buf_mmap.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 11:20:31 UTC 2024 - 1.6K bytes - Viewed (0) -
src/runtime/os_openbsd_syscall2.go
// mmap calls the mmap system call. It is implemented in assembly. // We only pass the lower 32 bits of file offset to the // assembly routine; the higher bits (if required), should be provided // by the assembly routine as 0. // The err result is an OS error code such as ENOMEM. func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (p unsafe.Pointer, err int)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 2.5K bytes - Viewed (0) -
src/cmd/link/internal/ld/outbuf_darwin.go
_, err = fcntl(int(out.f.Fd()), syscall.F_PREALLOCATE, int(uintptr(unsafe.Pointer(store)))) return err } func (out *OutBuf) purgeSignatureCache() { // Apparently, the Darwin kernel may cache the code signature at mmap. // When we mmap the output buffer, it doesn't have a code signature // (as we haven't generated one). Invalidate the kernel cache now that // we have generated the signature. See issue #42684. msync(out.buf, syscall.MS_INVALIDATE)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 13 15:50:02 UTC 2022 - 1.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/mremap.go
mmapper mremap func(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error) } var mapper = &mremapMmapper{ mmapper: mmapper{ active: make(map[*byte][]byte), mmap: mmap, munmap: munmap, }, mremap: mremap, } func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 1.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/telemetry/internal/counter/parse.go
// license that can be found in the LICENSE file. package counter import ( "bytes" "fmt" "strings" "unsafe" "golang.org/x/telemetry/internal/mmap" ) type File struct { Meta map[string]string Count map[string]uint64 } func Parse(filename string, data []byte) (*File, error) { if !bytes.HasPrefix(data, []byte(hdrPrefix)) || len(data) < pageSize { if len(data) < pageSize {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 14:38:01 UTC 2024 - 1.8K bytes - Viewed (0)