- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 22 for sysAlloc (0.11 sec)
-
src/runtime/HACKING.md
There are three mechanisms for allocating unmanaged memory: * sysAlloc obtains memory directly from the OS. This comes in whole multiples of the system page size, but it can be freed with sysFree. * persistentalloc combines multiple smaller allocations into a single sysAlloc to avoid fragmentation. However, there is no way to free persistentalloced objects (hence the name).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 13.9K bytes - Viewed (0) -
src/runtime/arena.go
hintList = &h.arenaHints } v, size := h.sysAlloc(userArenaChunkBytes, hintList, false) if size%userArenaChunkBytes != 0 { throw("sysAlloc size is not divisible by userArenaChunkBytes") } if size > userArenaChunkBytes { // We got more than we asked for. This can happen if // heapArenaSize > userArenaChunkSize, or if sysAlloc just returns
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:44:56 UTC 2024 - 37.9K bytes - Viewed (0) -
src/runtime/os_freebsd.go
throw("newosproc") } } // Version of newosproc that doesn't require a valid G. // //go:nosplit func newosproc0(stacksize uintptr, fn unsafe.Pointer) { stack := sysAlloc(stacksize, &memstats.stacks_sys) if stack == nil { writeErrStr(failallocatestack) exit(1) } // This code "knows" it's being called once from the library
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 05 20:34:30 UTC 2023 - 11.6K bytes - Viewed (0) -
src/runtime/malloc_test.go
t.FailNow() } } type acLink struct { x [1 << 20]byte } var arenaCollisionSink []*acLink func TestArenaCollision(t *testing.T) { testenv.MustHaveExec(t) // Test that mheap.sysAlloc handles collisions with other // memory mappings. if os.Getenv("TEST_ARENA_COLLISION") != "1" { cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=^TestArenaCollision$", "-test.v"))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:29 UTC 2023 - 10.6K bytes - Viewed (0) -
src/runtime/mheap.go
n := 64 * 1024 / goarch.PtrSize if n < cap(h.allspans)*3/2 { n = cap(h.allspans) * 3 / 2 } var new []*mspan sp := (*slice)(unsafe.Pointer(&new)) sp.array = sysAlloc(uintptr(n)*goarch.PtrSize, &memstats.other_sys) if sp.array == nil { throw("runtime: cannot allocate memory") } sp.len = len(h.allspans) sp.cap = n if len(h.allspans) > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:31:00 UTC 2024 - 78K bytes - Viewed (0) -
src/runtime/heapdump.go
nptr := size / goarch.PtrSize if uintptr(len(tmpbuf)) < nptr/8+1 { if tmpbuf != nil { sysFree(unsafe.Pointer(&tmpbuf[0]), uintptr(len(tmpbuf)), &memstats.other_sys) } n := nptr/8 + 1 p := sysAlloc(n, &memstats.other_sys) if p == nil { throw("heapdump: out of memory") } tmpbuf = (*[1 << 30]byte)(p)[:n] } // Convert heap bitmap to pointer bitmap. clear(tmpbuf[:nptr/8+1]) s := spanOf(p)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 09 04:07:57 UTC 2024 - 17.6K bytes - Viewed (0) -
src/runtime/sys_darwin.go
} return } func osinit_hack_trampoline() // mmap is used to do low-level memory allocation via mmap. Don't allow stack // splits, since this function (used by sysAlloc) is called in a lot of low-level // parts of the runtime and callers often assume it won't acquire any locks. // //go:nosplit
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:17:26 UTC 2024 - 23.9K bytes - Viewed (0) -
src/runtime/os_linux.go
} throw("newosproc") } } // Version of newosproc that doesn't require a valid G. // //go:nosplit func newosproc0(stacksize uintptr, fn unsafe.Pointer) { stack := sysAlloc(stacksize, &memstats.stacks_sys) if stack == nil { writeErrStr(failallocatestack) exit(1) } ret := clone(cloneFlags, unsafe.Pointer(uintptr(stack)+stacksize), nil, nil, fn) if ret < 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 25.9K bytes - Viewed (0) -
src/runtime/stack.go
throw("stack size not a power of 2") } if stackDebug >= 1 { print("stackalloc ", n, "\n") } if debug.efence != 0 || stackFromSystem != 0 { n = uint32(alignUp(uintptr(n), physPageSize)) v := sysAlloc(uintptr(n), &memstats.stacks_sys) if v == nil { throw("out of memory (stackalloc)") } return stack{uintptr(v), uintptr(v) + uintptr(n)} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:31:00 UTC 2024 - 41.1K bytes - Viewed (0) -
src/runtime/mpagealloc.go
for c := chunkIndex(base); c < chunkIndex(limit); c++ { if p.chunks[c.l1()] == nil { // Create the necessary l2 entry. const l2Size = unsafe.Sizeof(*p.chunks[0]) r := sysAlloc(l2Size, p.sysStat) if r == nil { throw("pageAlloc: out of memory") } if !p.test { // Make the chunk mapping eligible or ineligible // for huge pages, depending on what our current
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 39.2K bytes - Viewed (0)