When I use the requestHeapFrame instruction to request more heap, I expect it likely adds additional cost to my transaction. How do I calculate how much additional cost it would take?

  • Just want to point out that as of right now, September 2023, the requestHeapFrame ix doesn't seem to do anything. The heap still goes out-of-memory in the normal amount of space in applications where we have tested it on localnet/devnet, unless this has been updated in the last few weeks.
    – Whiteseal
    Sep 27 at 19:49

1 Answer 1


The requestHeapFrame instruction adds an additional 8 compute units per 32K heap requested.

This means if you have a compute budget instruction for requestHeapFrame and use SetComputeUnitPrice to set the microLamport price to 1 microLamport, you would incur 8 * (heapRequested / 32K) * computeUnitPrice more in microLamports on your transaction.

If you're interested in requesting more heap for your program, you'll have to add some code in order to make it possible to increase the total heap available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.