Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for heapBitsInSpan (0.17 sec)

  1. src/runtime/mbitmap.go

    func heapSetType(x, dataSize uintptr, typ *_type, header **_type, span *mspan) (scanSize uintptr) {
    	const doubleCheck = false
    
    	gctyp := typ
    	if header == nil {
    		if doubleCheck && (!heapBitsInSpan(dataSize) || !heapBitsInSpan(span.elemsize)) {
    			throw("tried to write heap bits, but no heap bits in span")
    		}
    		// Handle the case where we have no malloc header.
    		scanSize = span.writeHeapBitsSmall(x, dataSize, typ)
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  2. src/runtime/malloc.go

    				// Note: disabled when race detector is on, see comment near end of this function.
    				c.tiny = uintptr(x)
    				c.tinyoffset = size
    			}
    			size = maxTinySize
    		} else {
    			hasHeader := !noscan && !heapBitsInSpan(size)
    			if hasHeader {
    				size += mallocHeaderSize
    			}
    			var sizeclass uint8
    			if size <= smallSizeMax-8 {
    				sizeclass = size_to_class8[divRoundUp(size, smallSizeDiv)]
    			} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  3. src/runtime/mheap.go

    		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.
    				s.nelems = uint16((nbytes - (nbytes / goarch.PtrSize / 8)) / s.elemsize)
    			} else {
    				s.nelems = uint16(nbytes / s.elemsize)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 78K bytes
    - Viewed (0)
Back to top