How to get heap / RAM usage of a program? #6316
Replies: 1 comment
-
Posted at 2020-08-30 by @fanoush
Also check http://www.espruino.com/Internals There is no heap, just variables. Also there is CPU stack growing down, the value can be seen in Posted at 2020-08-30 by Ragtime Thanks a lot for your help! :)
Result:
If I understand the document correctly, then Posted at 2020-08-30 by Ragtime Another example of fibonacci:
Result:
It's fun to see how the RAM usage grows, but I don't find how I can get the peak RAM usage of the program without putting Posted at 2020-08-30 by @fanoush free+usage=total, history is command lines entered into console, available when pressing up key, those are cleared automatically when memory is low so are not counted into used space Posted at 2020-08-30 by Ragtime Understood! Thanks a lot for your help :) Posted at 2020-08-31 by @gfwilliams
That's what you'd have to do I'm afraid - there's no way to get peak RAM usage without doing that. It's a bit tricky to get a solid figure for that because of garbage collection. Posted at 2020-08-31 by Ragtime Understood! Thanks :) Posted at 2020-08-31 by @fanoush there is also a builtin debugger, try to run Posted at 2020-08-31 by Ragtime Good idea! I tried |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-08-30 by Ragtime
Hello there,
Does anyone know how I can get the heap or RAM usage of a program on Pixl?
I'm trying to find out how much RAM or heap can be saved from applying the Performance Notes. Also trying to see how much RAM is used by the Espruino engine itself and by my program.
Any help will be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions