Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for aligned (0.14 sec)

  1. src/runtime/malloc.go

    		p = alignUp(p, align)
    		p2 := sysReserve(unsafe.Pointer(p), size)
    		if p != uintptr(p2) {
    			// Must have raced. Try again.
    			sysFreeOS(p2, size)
    			if retries++; retries == 100 {
    				throw("failed to allocate aligned heap memory; too many retries")
    			}
    			goto retry
    		}
    		// Success.
    		return p2, size
    	default:
    		// Trim off the unaligned parts.
    		pAligned := alignUp(p, align)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  2. src/runtime/mgcscavenge.go

    	} else if minimum > maxPagesPerPhysPage {
    		print("runtime: min = ", minimum, "\n")
    		throw("min too large")
    	}
    	// max may not be min-aligned, so we might accidentally truncate to
    	// a max value which causes us to return a non-min-aligned value.
    	// To prevent this, align max up to a multiple of min (which is always
    	// a power of 2). This also prevents max from ever being less than
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:48:45 UTC 2024
    - 52.3K bytes
    - Viewed (0)
  3. src/runtime/mheap.go

    	// On some platforms we need to provide physical page aligned stack
    	// allocations. Where the page size is less than the physical page
    	// size, we already manage to do this by default.
    	needPhysPageAlign := physPageAlignedStacks && typ == spanAllocStack && pageSize < physPageSize
    
    	// If the allocation is small enough, try the page cache!
    	// The page cache does not support aligned allocations, so we cannot use
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 78K bytes
    - Viewed (0)
  4. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/versions/VersionConflictResolutionIntegrationTest.groovy

            // Aligned modules
            def firstAligned = mavenRepo.module('org.aligned', 'aligned1', '1.0').dependsOn(intermediate20).publish()
            mavenRepo.module('org.aligned', 'aligned1', '2.0').dependsOn(intermediate20).publish()
            def otherAligned = mavenRepo.module('org.aligned', 'aligned2', '2.0').publish()
    
            // Roots
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 11:33:46 UTC 2024
    - 76.2K bytes
    - Viewed (0)
  5. src/runtime/mbitmap.go

    			if span.spanclass.sizeclass() != 0 {
    				throw("GCProg for type that isn't large")
    			}
    			spaceNeeded := alignUp(unsafe.Sizeof(_type{}), goarch.PtrSize)
    			heapBitsOff := spaceNeeded
    			spaceNeeded += alignUp(typ.PtrBytes/goarch.PtrSize/8, goarch.PtrSize)
    			npages := alignUp(spaceNeeded, pageSize) / pageSize
    			var progSpan *mspan
    			systemstack(func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  6. src/runtime/mgcmark.go

    //
    //go:nowritebarrierrec
    func greyobject(obj, base, off uintptr, span *mspan, gcw *gcWork, objIndex uintptr) {
    	// obj should be start of allocation, and so must be at least pointer-aligned.
    	if obj&(goarch.PtrSize-1) != 0 {
    		throw("greyobject: obj not pointer-aligned")
    	}
    	mbits := span.markBitsForIndex(objIndex)
    
    	if useCheckmark {
    		if setCheckmark(obj, base, off, mbits) {
    			// Already marked.
    			return
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 21:25:11 UTC 2024
    - 52.5K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/sys/windows/security_windows.go

    	src := unsafe.Slice((*byte)(unsafe.Pointer(selfRelativeSD)), sdLen)
    	// SECURITY_DESCRIPTOR has pointers in it, which means checkptr expects for it to
    	// be aligned properly. When we're copying a Windows-allocated struct to a
    	// Go-allocated one, make sure that the Go allocation is aligned to the
    	// pointer size.
    	const psize = int(unsafe.Sizeof(uintptr(0)))
    	alloc := make([]uintptr, (sdLen+psize-1)/psize)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 52.5K bytes
    - Viewed (0)
  8. src/runtime/asm_amd64.s

    	// Assert ctxt is zero. See func save.
    	MOVQ	(g_sched+gobuf_ctxt)(R14), R9
    	TESTQ	R9, R9
    	JZ	2(PC)
    	CALL	runtime·abort(SB)
    	RET
    
    // func asmcgocall_no_g(fn, arg unsafe.Pointer)
    // Call fn(arg) aligned appropriately for the gcc ABI.
    // Called on a system stack, and there may be no g yet (during needm).
    TEXT ·asmcgocall_no_g(SB),NOSPLIT,$32-16
    	MOVQ	fn+0(FP), AX
    	MOVQ	arg+8(FP), BX
    	MOVQ	SP, DX
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 11 20:38:24 UTC 2024
    - 60.4K bytes
    - Viewed (0)
  9. src/cmd/link/internal/ld/elf.go

    		ehdr.Shentsize = ELF32SHDRSIZE /* Must be ELF32SHDRSIZE */
    	}
    }
    
    // Make sure PT_LOAD is aligned properly and
    // that there is no gap,
    // correct ELF loaders will do this implicitly,
    // but buggy ELF loaders like the one in some
    // versions of QEMU and UPX won't.
    func fixElfPhdr(e *ElfPhdr) {
    	frag := int(e.Vaddr & (e.Align - 1))
    
    	e.Off -= uint64(frag)
    	e.Vaddr -= uint64(frag)
    	e.Paddr -= uint64(frag)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 13:29:54 UTC 2024
    - 63.6K bytes
    - Viewed (0)
  10. src/sync/atomic/atomic_test.go

    }
    
    func TestAutoAligned64(t *testing.T) {
    	var signed struct {
    		_ uint32
    		i Int64
    	}
    	if o := reflect.TypeOf(&signed).Elem().Field(1).Offset; o != 8 {
    		t.Fatalf("Int64 offset = %d, want 8", o)
    	}
    	if p := reflect.ValueOf(&signed).Elem().Field(1).Addr().Pointer(); p&7 != 0 {
    		t.Fatalf("Int64 pointer = %#x, want 8-aligned", p)
    	}
    
    	var unsigned struct {
    		_ uint32
    		i Uint64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:37:29 UTC 2024
    - 71.4K bytes
    - Viewed (0)
Back to top