- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 64 for alignof (0.2 sec)
-
src/internal/types/testdata/check/builtins0.go
unsafe /* ERROR "not used" */ .Alignof(x) var y S0 assert(unsafe.Alignof(y.a) == 1) assert(unsafe.Alignof(y.b) == 4) assert(unsafe.Alignof(y.c) == 8) assert(unsafe.Alignof(y.d) == 1) assert(unsafe.Alignof(y.e) == 8) var s []byte _ = unsafe.Alignof(s) _ = unsafe.Alignof(s... /* ERROR "invalid use of ..." */ ) } func Alignof2() { f1 := func() (x int32) { return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 29.3K bytes - Viewed (0) -
src/unsafe/unsafe.go
// of a field of that type within a struct. This case is the same as the // value returned by [reflect.TypeOf](s.f).FieldAlign(). // The return value of Alignof is a Go constant if the type of the argument // does not have variable size. // (See the description of [Sizeof] for a definition of variable sized types.) func Alignof(x ArbitraryType) uintptr
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 19:45:20 UTC 2024 - 12.1K bytes - Viewed (0) -
src/go/types/builtins.go
} x.mode = value x.typ = Typ[UnsafePointer] if check.recordTypes() { check.recordBuiltinType(call.Fun, makeSig(x.typ, x.typ, y.typ)) } case _Alignof: // unsafe.Alignof(x T) uintptr check.assignment(x, nil, "argument to unsafe.Alignof") if x.mode == invalid { return } if hasVarSize(x.typ, nil) { x.mode = value if check.recordTypes() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 27.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/builtins.go
} x.mode = value x.typ = Typ[UnsafePointer] if check.recordTypes() { check.recordBuiltinType(call.Fun, makeSig(x.typ, x.typ, y.typ)) } case _Alignof: // unsafe.Alignof(x T) uintptr check.assignment(x, nil, "argument to unsafe.Alignof") if x.mode == invalid { return } if hasVarSize(x.typ, nil) { x.mode = value if check.recordTypes() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 27.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go
case *ast.Ident: id = fun case *ast.SelectorExpr: id = fun.Sel } if fun, ok := pass.TypesInfo.Uses[id].(*types.Builtin); ok { switch fun.Name() { case "new", "len", "cap", "Sizeof", "Offsetof", "Alignof": return } } for _, x := range ce.Args { if path := lockPathRhs(pass, x); path != nil { pass.ReportRangef(x, "call of %s copies lock value: %v", analysisutil.Format(pass.Fset, ce.Fun), path) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 9.9K bytes - Viewed (0) -
src/runtime/syscall_windows.go
// caller reserved spill space. p.dstSpill = alignUp(p.dstSpill, uintptr(t.Align_)) p.dstSpill += t.Size_ } else { // Register assignment failed. // Undo the work and stack assign. p.parts = oldParts // The Go ABI aligns arguments. p.dstStackSize = alignUp(p.dstStackSize, uintptr(t.Align_)) // Copy just the size of the argument. Note that this
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 20:12:46 UTC 2024 - 16.6K bytes - Viewed (0) -
src/runtime/stubs.go
// // *ptr is uninitialized memory (e.g., memory that's being reused // for a new allocation) and hence contains only "junk". // // memclrNoHeapPointers ensures that if ptr is pointer-aligned, and n // is a multiple of the pointer size, then any pointer-aligned, // pointer-sized portion is cleared atomically. Despite the function // name, this is necessary because this function is the underlying
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 20.2K bytes - Viewed (0) -
src/cmd/internal/obj/objfile.go
// These are just bytes, or varints. align = 1 case strings.HasPrefix(name, "gclocals·"): // It has 32-bit fields. align = 4 default: switch { case w.ctxt.Arch.PtrSize == 8 && s.Size%8 == 0: align = 8 case s.Size%4 == 0: align = 4 case s.Size%2 == 0: align = 2 default: align = 1 } } } if s.Size > cutoff {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 24K bytes - Viewed (0) -
src/runtime/mpallocbits.go
} // pages64 returns a 64-bit bitmap representing a block of 64 pages aligned // to 64 pages. The returned block of pages is the one containing the i'th // page in this pallocBits. Each bit represents whether the page is in-use. func (b *pallocBits) pages64(i uint) uint64 { return (*pageBits)(b).block64(i) } // allocPages64 allocates a 64-bit block of 64 pages aligned to 64 pages according
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 18 15:13:43 UTC 2024 - 12.5K bytes - Viewed (0) -
internal/ioutil/ioutil.go
// directio.AlignSize is defined as 0 in MacOS causing divide by 0 error. const DirectioAlignSize = 4096 // CopyAligned - copies from reader to writer using the aligned input // buffer, it is expected that input buffer is page aligned to // 4K page boundaries. Without passing aligned buffer may cause // this function to return error. // // This code is similar in spirit to io.Copy but it is only to be
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 10.2K bytes - Viewed (0)