Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for divRoundUp (0.31 sec)

  1. src/runtime/mbitmap.go

    func materializeGCProg(ptrdata uintptr, prog *byte) *mspan {
    	// Each word of ptrdata needs one bit in the bitmap.
    	bitmapBytes := divRoundUp(ptrdata, 8*goarch.PtrSize)
    	// Compute the number of pages needed for bitmapBytes.
    	pages := divRoundUp(bitmapBytes, pageSize)
    	s := mheap_.allocManual(pages, spanAllocPtrScalarBits)
    	runGCProg(addb(prog, 4), (*byte)(unsafe.Pointer(s.startAddr)))
    	return s
    }
    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

    			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]
    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/mgcmark.go

    //
    // The world must be stopped.
    func gcMarkRootPrepare() {
    	assertWorldStopped()
    
    	// Compute how many data and BSS root blocks there are.
    	nBlocks := func(bytes uintptr) int {
    		return int(divRoundUp(bytes, rootBlockBytes))
    	}
    
    	work.nDataRoots = 0
    	work.nBSSRoots = 0
    
    	// Scan globals.
    	for _, datap := range activeModules() {
    		nDataRoots := nBlocks(datap.edata - datap.data)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 21:25:11 UTC 2024
    - 52.5K bytes
    - Viewed (0)
Back to top