MCPcopy Create free account
hub / github.com/segmentio/encoding / align

Function align

proto/slice.go:125–130  ·  view source on GitHub ↗
(align, size uintptr)

Source from the content-addressed store, hash-verified

123}
124
125func align(align, size uintptr) uintptr {
126 if align != 0 && (size%align) != 0 {
127 size = ((size / align) + 1) * align
128 }
129 return size
130}
131
132func growSlice(t reflect.Type, s *Slice) Slice {
133 cap := 2 * s.Cap()

Callers 1

alignedSizeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…