- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for sizeclass (0.28 sec)
-
src/runtime/mheap.go
// since we're not holding the heap lock. s.spanclass = spanclass if sizeclass := spanclass.sizeclass(); sizeclass == 0 { s.elemsize = nbytes s.nelems = 1 s.divMul = 0 } else { s.elemsize = uintptr(class_to_size[sizeclass]) if !s.spanclass.noscan() && heapBitsInSpan(s.elemsize) { // Reserve space for the pointer/scan bitmap at the end.
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/malloc.go
if hasHeader { size += mallocHeaderSize } var sizeclass uint8 if size <= smallSizeMax-8 { sizeclass = size_to_class8[divRoundUp(size, smallSizeDiv)] } else { sizeclass = size_to_class128[divRoundUp(size-smallSizeMax, largeSizeDiv)] } size = uintptr(class_to_size[sizeclass]) spc := makeSpanClass(sizeclass, noscan) span = c.alloc[spc] v := nextFreeFast(span)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 59.6K bytes - Viewed (0) -
src/runtime/mbitmap.go
// Handle header-less objects. return typePointers{elem: addr, addr: addr, mask: span.heapBitsSmallForAddr(addr)} } // All of these objects have a header. var typ *_type if spc.sizeclass() != 0 { // Pull the allocation header from the first word of the object. typ = *(**_type)(unsafe.Pointer(addr)) addr += mallocHeaderSize } else { typ = span.largeType if typ == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 60K bytes - Viewed (0)