- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for roundupsize (0.15 sec)
-
src/runtime/slice.go
case et.Size_ == 1: lenmem = uintptr(oldLen) newlenmem = uintptr(newLen) capmem = roundupsize(uintptr(newcap), noscan) overflow = uintptr(newcap) > maxAlloc newcap = int(capmem) case et.Size_ == goarch.PtrSize: lenmem = uintptr(oldLen) * goarch.PtrSize newlenmem = uintptr(newLen) * goarch.PtrSize capmem = roundupsize(uintptr(newcap)*goarch.PtrSize, noscan) overflow = uintptr(newcap) > maxAlloc/goarch.PtrSize
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 12.2K bytes - Viewed (0) -
src/runtime/msize.go
package runtime // Returns size of the memory block that mallocgc will allocate if you ask for the size, // minus any inline space for metadata. func roundupsize(size uintptr, noscan bool) (reqSize uintptr) { reqSize = size if reqSize <= maxSmallSize-mallocHeaderSize { // Small object. if !noscan && reqSize > minSizeForMallocHeader { // !noscan && !heapBitsInSpan(reqSize)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 09 04:07:57 UTC 2024 - 1.3K bytes - Viewed (0) -
src/runtime/string.go
return unsafe.String((*byte)(p), size), unsafe.Slice((*byte)(p), size) } // rawbyteslice allocates a new byte slice. The byte slice is not zeroed. func rawbyteslice(size int) (b []byte) { cap := roundupsize(uintptr(size), true) p := mallocgc(cap, nil, false) if cap != uintptr(size) { memclrNoHeapPointers(add(p, uintptr(size)), cap-uintptr(size)) } *(*slice)(unsafe.Pointer(&b)) = slice{p, size, int(cap)}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:17:26 UTC 2024 - 13.4K bytes - Viewed (0) -
src/cmd/compile/internal/test/inl_test.go
"getm", "getMCache", "isDirectIface", "itabHashFunc", "nextslicecap", "noescape", "pcvalueCacheKey", "rand32", "readUnaligned32", "readUnaligned64", "releasem", "roundupsize", "stackmapdata", "stringStructOf", "subtract1", "subtractb", "tophash", "(*bmap).keys", "(*bmap).overflow", "(*waitq).enqueue", "funcInfo.entry", // GC-related ones
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 09 04:07:57 UTC 2024 - 10.7K bytes - Viewed (0) -
src/runtime/map.go
// Add on the estimated number of overflow buckets // required to insert the median number of elements // used with this value of b. nbuckets += bucketShift(b - 4) sz := t.Bucket.Size_ * nbuckets up := roundupsize(sz, !t.Bucket.Pointers()) if up != sz { nbuckets = up / t.Bucket.Size_ } } if dirtyalloc == nil { buckets = newarray(t.Bucket, int(nbuckets)) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 57.6K bytes - Viewed (0)