- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for sysAllocOS (0.14 sec)
-
src/runtime/mem_aix.go
package runtime import ( "unsafe" ) // Don't split the stack as this method may be invoked without a valid G, which // 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) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 19:05:10 UTC 2023 - 2K bytes - Viewed (0) -
src/runtime/mem_bsd.go
package runtime import ( "unsafe" ) // 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 sysAllocOS(n uintptr) unsafe.Pointer { v, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0) if err != 0 { return nil } return v } func sysUnusedOS(v unsafe.Pointer, n uintptr) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 19:05:10 UTC 2023 - 2.2K bytes - Viewed (0) -
src/runtime/mem_darwin.go
package runtime import ( "unsafe" ) // 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 sysAllocOS(n uintptr) unsafe.Pointer { v, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0) if err != 0 { return nil } return v } func sysUnusedOS(v unsafe.Pointer, n uintptr) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 19:05:10 UTC 2023 - 2K bytes - Viewed (0) -
src/runtime/debuglog.go
l = l1 break } } } // If that failed, allocate a new logger. if l == nil { // Use sysAllocOS instead of sysAlloc because we want to interfere // with the runtime as little as possible, and sysAlloc updates accounting. l = (*dlogger)(sysAllocOS(unsafe.Sizeof(dlogger{}))) if l == nil { throw("failed to allocate debug log") } l.w.r.data = &l.w.data l.owned.Store(1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 15:10:48 UTC 2024 - 18.3K bytes - Viewed (0) -
src/runtime/mem_windows.go
_ERROR_NOT_ENOUGH_MEMORY = 8 _ERROR_COMMITMENT_LIMIT = 1455 ) // 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 sysAllocOS(n uintptr) unsafe.Pointer { return unsafe.Pointer(stdcall4(_VirtualAlloc, 0, n, _MEM_COMMIT|_MEM_RESERVE, _PAGE_READWRITE)) } func sysUnusedOS(v unsafe.Pointer, n uintptr) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 19:05:10 UTC 2023 - 3.9K bytes - Viewed (0) -
src/runtime/mem_sbrk.go
} } } } func memRound(p uintptr) uintptr { return alignUp(p, physPageSize) } func initBloc() { bloc = memRound(firstmoduledata.end) blocMax = bloc } func sysAllocOS(n uintptr) unsafe.Pointer { lock(&memlock) p := memAlloc(n) memCheck() unlock(&memlock) return p } func sysFreeOS(v unsafe.Pointer, n uintptr) { lock(&memlock) if uintptr(v)+n == bloc {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 19:05:10 UTC 2023 - 4.2K bytes - Viewed (0) -
src/runtime/mem_linux.go
"unsafe" ) const ( _EACCES = 13 _EINVAL = 22 ) // Don't split the stack as this method may be invoked without a valid G, which // 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) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 5K bytes - Viewed (0) -
src/runtime/mem.go
// which prevents us from allocating more stack. // //go:nosplit func sysAlloc(n uintptr, sysStat *sysMemStat) unsafe.Pointer { sysStat.add(int64(n)) gcController.mappedReady.Add(int64(n)) return sysAllocOS(n) } // sysUnused transitions a memory region from Ready to Prepared. It notifies the // operating system that the physical pages backing this memory region are no
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 19:05:10 UTC 2023 - 6.7K bytes - Viewed (0) -
src/runtime/malloc.go
mapped: // Create arena metadata. for ri := arenaIndex(uintptr(v)); ri <= arenaIndex(uintptr(v)+size-1); ri++ { l2 := h.arenas[ri.l1()] if l2 == nil { // Allocate an L2 arena map. // // Use sysAllocOS instead of sysAlloc or persistentalloc because there's no // statistic we can comfortably account for this space in. With this structure, // we rely on demand paging to avoid large overheads, but tracking which memory
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 59.6K bytes - Viewed (0)