# Doubt Regarding Stable memory Pages

**URL:** <https://forum.dfinity.org/t/doubt-regarding-stable-memory-pages/38230>\
**Category:** Rust\
**Created:** [December 4, 2024, 11:32am UTC](https://forum.dfinity.org/t/doubt-regarding-stable-memory-pages/38230 "2024-12-04T11:32:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ray04](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ray04/32/24164_2.png) [@Ray04](https://forum.dfinity.org/u/Ray04)\
**Post date:** [December 4, 2024, 11:32am UTC](https://forum.dfinity.org/t/doubt-regarding-stable-memory-pages/38230/1 "2024-12-04T11:32:22Z")

</div>

Just a simple question that, how do I know which API is using stable memory and which is using heap memory.  
I usually do this before, by using the local dashboard (which can be done with --verbose in the latest release) , but if I’d like to know which exact APIs are consuming the pages in stable memory. Is there a way to do so?

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [December 4, 2024, 3:01pm UTC](https://forum.dfinity.org/t/doubt-regarding-stable-memory-pages/38230/2 "2024-12-04T15:01:39Z")

</div>

On a protocol level, you can see all APIs that interact with stable memory [here](https://internetcomputer.org/docs/current/references/ic-interface-spec#system-api-stable-memory). But this is probably not very useful to you. As a rule of thumb any data structure not explicitly declared as stable will be on the heap. Read/write operations go to the memory where the data structure was declared for.

We have the [canbench](https://github.com/dfinity/canbench) tool which can tell you exactly how much memory of what kind a certain function accesses

---

<div class="post-metadata">

**Author:** ![Ray04](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ray04/32/24164_2.png) [@Ray04](https://forum.dfinity.org/u/Ray04)\
**Post date:** [December 5, 2024, 6:34am UTC](https://forum.dfinity.org/t/doubt-regarding-stable-memory-pages/38230/3 "2024-12-05T06:34:07Z")

</div>

canbench sounds like just what I need. Thanks, severin.
