Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for divRoundUp (0.19 sec)

  1. src/runtime/msize.go

    		// from the result if we have one, since mallocgc will add it back in.
    		if reqSize <= smallSizeMax-8 {
    			return uintptr(class_to_size[size_to_class8[divRoundUp(reqSize, smallSizeDiv)]]) - (reqSize - size)
    		}
    		return uintptr(class_to_size[size_to_class128[divRoundUp(reqSize-smallSizeMax, largeSizeDiv)]]) - (reqSize - size)
    	}
    	// Large object. Align reqSize up to the next page. Check for overflow.
    	reqSize += pageSize - 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  2. src/runtime/mem_wasm.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package runtime
    
    import "unsafe"
    
    func sbrk(n uintptr) unsafe.Pointer {
    	grow := divRoundUp(n, physPageSize)
    	size := growMemory(int32(grow))
    	if size < 0 {
    		return nil
    	}
    	resetMemoryDataView()
    	return unsafe.Pointer(uintptr(size) * physPageSize)
    }
    
    // Implemented in src/runtime/sys_wasm.s
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 06 17:48:24 UTC 2023
    - 488 bytes
    - Viewed (0)
Back to top