Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 248 for alignment (0.25 sec)

  1. src/cmd/internal/obj/util.go

    // AlignmentPadding bytes to add to align code as requested.
    // Alignment is restricted to powers of 2 between 8 and 2048 inclusive.
    //
    // pc_: current offset in function, in bytes
    // p:  a PCALIGN or PCALIGNMAX prog
    // ctxt: the context, for current function
    // cursym: current function being assembled
    // returns number of bytes of padding needed,
    // updates minimum alignment for the function.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  2. src/cmd/vendor/github.com/google/pprof/internal/elfexec/elfexec.go

    func parseNotes(reader io.Reader, alignment int, order binary.ByteOrder) ([]elfNote, error) {
    	r := bufio.NewReader(reader)
    
    	// padding returns the number of bytes required to pad the given size to an
    	// alignment boundary.
    	padding := func(size int) int {
    		return ((size + (alignment - 1)) &^ (alignment - 1)) - size
    	}
    
    	var notes []elfNote
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  3. src/internal/syscall/windows/syscall_windows.go

    	FileAttributes uint32
    
    	// Pad out to 8-byte alignment.
    	//
    	// Without this padding, TestChmod fails due to an argument validation error
    	// in SetFileInformationByHandle on windows/386.
    	//
    	// https://learn.microsoft.com/en-us/cpp/build/reference/zp-struct-member-alignment?view=msvc-170
    	// says that “The C/C++ headers in the Windows SDK assume the platform's
    	// default alignment is used.” What we see here is padding rather than
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  4. pkg/kubelet/cm/devicemanager/topology_hints_test.go

    		}
    
    		alignment := make(map[int]int)
    		if m.deviceHasTopologyAlignment(tc.resource) {
    			for d := range allocated {
    				if m.allDevices[tc.resource][d].Topology != nil {
    					alignment[int(m.allDevices[tc.resource][d].Topology.Nodes[0].ID)]++
    				}
    			}
    		}
    
    		if !reflect.DeepEqual(alignment, tc.expectedAlignment) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 13:02:15 UTC 2023
    - 47.5K bytes
    - Viewed (0)
  5. src/reflect/abi.go

    		a.fregs++
    	}
    	return true
    }
    
    // stackAssign reserves space for one value that is "size" bytes
    // large with alignment "alignment" to the stack.
    //
    // Should not be called directly; use addArg instead.
    func (a *abiSeq) stackAssign(size, alignment uintptr) {
    	a.stackBytes = align(a.stackBytes, alignment)
    	a.steps = append(a.steps, abiStep{
    		kind:   abiStepStack,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:08:32 UTC 2024
    - 15K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/convert.go

    	}
    	switch {
    	case from.Size() == 2 && uint8(from.Alignment()) == 2:
    		return "convT16", types.Types[types.TUINT16], false
    	case from.Size() == 4 && uint8(from.Alignment()) == 4 && !from.HasPointers():
    		return "convT32", types.Types[types.TUINT32], false
    	case from.Size() == 8 && uint8(from.Alignment()) == uint8(types.Types[types.TUINT64].Alignment()) && !from.HasPointers():
    		return "convT64", types.Types[types.TUINT64], false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 17:28:22 UTC 2023
    - 18.2K bytes
    - Viewed (0)
  7. src/unsafe/unsafe.go

    //	e := unsafe.Pointer(uintptr(unsafe.Pointer(&x[0])) + i*unsafe.Sizeof(x[0]))
    //
    // It is valid both to add and to subtract offsets from a pointer in this way.
    // It is also valid to use &^ to round pointers, usually for alignment.
    // In all cases, the result must continue to point into the original allocated object.
    //
    // Unlike in C, it is not valid to advance a pointer just beyond the end of
    // its original allocation:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 19:45:20 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  8. pkg/kubelet/cm/cpumanager/policy_static.go

    	ErrorSMTAlignment = "SMTAlignmentError"
    )
    
    // SMTAlignmentError represents an error due to SMT alignment
    type SMTAlignmentError struct {
    	RequestedCPUs         int
    	CpusPerCore           int
    	AvailablePhysicalCPUs int
    }
    
    func (e SMTAlignmentError) Error() string {
    	if e.AvailablePhysicalCPUs > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 06 13:16:15 UTC 2023
    - 28.8K bytes
    - Viewed (0)
  9. src/hash/crc32/crc32_test.go

    						benchmark(b, h, int64(size), int64(align))
    					})
    				}
    			})
    		}
    	}
    }
    
    func benchmark(b *testing.B, h hash.Hash32, n, alignment int64) {
    	b.SetBytes(n)
    	data := make([]byte, n+alignment)
    	data = data[alignment:]
    	for i := range data {
    		data[i] = byte(i)
    	}
    	in := make([]byte, 0, h.Size())
    
    	// Warm up
    	h.Reset()
    	h.Write(data)
    	h.Sum(in)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  10. src/cmd/link/internal/ld/pe.go

    	// that this will need to grow in the future.
    	var size int
    	var alignment uint32
    	switch buildcfg.GOARCH {
    	default:
    		Exitf("peFile.addInitArray: unsupported GOARCH=%q\n", buildcfg.GOARCH)
    	case "386", "arm":
    		size = 4
    		alignment = IMAGE_SCN_ALIGN_4BYTES
    	case "amd64", "arm64":
    		size = 8
    		alignment = IMAGE_SCN_ALIGN_8BYTES
    	}
    	sect := f.addSection(".ctors", size, size)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 19:01:27 UTC 2023
    - 48.8K bytes
    - Viewed (0)
Back to top