Doubt Regarding Stable memory Pages

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?

On a protocol level, you can see all APIs that interact with stable memory here. 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 tool which can tell you exactly how much memory of what kind a certain function accesses

1 Like

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

1 Like