Embedded stack usage aggregation calculator

Calculate bounded call-chain stack estimate and per-function path estimates with your own figures.

Your numbers

Use the units shown. Results update as you change valid inputs.

Use bounded call-chain stack estimate and per-function path estimates to compare changes to your inputs. The method and limits below explain the scope.

Examples

Examples

Try the starting example

Functions [ID,frame bytes,maximum recursive frames]
[["main",64,1],["A",32,2],["B",128,1]]
Acyclic inter-function call edges [caller,callee]
[["main","A"],["A","B"]]
Additional interrupt-reserve bytes
128
Bounded call-chain stack estimate (bytes)
384
Per-function path estimates
[["main",256],["A",192],["B",128]]

Try another scenario

Functions [ID,frame bytes,maximum recursive frames]
[["main",64,1],["A",32,2],["B",128,1]]
Acyclic inter-function call edges [caller,callee]
[["main","A"],["A","B"]]
Additional interrupt-reserve bytes
256
Bounded call-chain stack estimate (bytes)
512
Per-function path estimates
[["main",256],["A",192],["B",128]]
Calculation method

Calculation method

Bounded call-chain stack estimate (bytes)

Longest weighted acyclic call path; function weight=frame×declared recursion bound; add interrupt reserve.

Per-function path estimates

Longest downstream weighted call chain from each function.

Symbols and units
a
Functions [ID,frame bytes,maximum recursive frames]
b
Acyclic inter-function call edges [caller,callee]
c
Additional interrupt-reserve bytes

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Assumptions & limits

Assumptions & limits

  • Call graph, frame sizes, recursion bounds. Returns Bounded maximum stack estimate. All coefficients and observations are user supplied; results describe only the stated mathematical model. Quantities are deterministic calculations from supplied observations and assumptions; no external data is fetched. Supported limits: Finite inputs only; numeric fields bounded as labelled. Lists and JSON records are limited to 256 entries unless a stricter tool bound is stated. No automatic design approval, legal conclusion, treatment recommendation or safety certification. Additional interrupt-reserve bytes: minimum 0, maximum 100000000.
Are these inputs private?

These calculations run in your browser. A shared link contains the values you choose to share. Only questions submitted to the separate AI finder are sent to OpenAI.

Share this page
Share this calculator

Leave unchecked to share the page without your entered values.