# math.big.int: add \`calcLimbLen\` doc comment note · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/38ee512a25776976caf787dff53126eed33ff835)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 38ee512a25776976caf787dff53126eed33ff835

Requested commit: 38ee512a25776976caf787dff53126eed33ff835

Commit: 38ee512a25776976caf787dff53126eed33ff835

Tree: 60ad869a07d0150008d66e4a76875914768c32c9

Author: Jacob Young

Committer: Jacob Young

## Message

```
math.big.int: add `calcLimbLen` doc comment note

When trying to allocate memory for functions like `Managed.init` and
`Managed.set` on the stack, a comptime-known allocation size is desired.
The doc comments for these functions indicate that `calcLimbLen` can be
used to determine how many limbs to allocate, but if `value` is not
comptime-known, then neither is `calcLimbLen(value)`.  However, an upper
bound on the allocation size is still computable at comptime in this
case, so this note documents an expression that can be used, rather than
trying to add it to every doc comment that mentions `calcLimbLen`.

```

## Parents

- [2fe5bdb9ed4e17c94055a9539092bdf35a55f752](https://git.cafe/gitcafe/zig/commit/2fe5bdb9ed4e17c94055a9539092bdf35a55f752?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/38ee512a25776976caf787dff53126eed33ff835?format=markdown)
