MCPcopy Create free account
hub / github.com/cockroachdb/apd / Size

Method Size

bigint.go:295–300  ·  view source on GitHub ↗

Size returns the total memory footprint of z in bytes.

()

Source from the content-addressed store, hash-verified

293
294// Size returns the total memory footprint of z in bytes.
295func (z *BigInt) Size() uintptr {
296 if z.isInline() {
297 return bigIntSize
298 }
299 return bigIntSize + mathBigIntSize + uintptr(cap(z._inner.Bits()))*mathWordSize
300}
301
302///////////////////////////////////////////////////////////////////////////////
303// inline arithmetic for small values //

Callers 1

TestSizeFunction · 0.45

Calls 2

isInlineMethod · 0.95
BitsMethod · 0.80

Tested by 1

TestSizeFunction · 0.36