Spark Web IDE Memory Tracker

When writing code in the Spark Web IDE, I find myself wanting to track the memory usage between each build of my code. Unfortunately, once you compile new code, the stats for the previous compile go away. If you’re not a afraid of a little cutting-and-pasting, I wrote a simple JavaScript page that makes it easy to track by parsing the output as-is without any editing. If you can copy everything from the Output of arm-none-eabi-size: line and below, you can track it. Just be warned that if you close or refresh the page, you’ll lose your stats. It’s possible that it could be stored in JavaScript cookies or HTML5 local storage, but I haven’t needed it that badly since I started writing it (earlier today). It’s pretty useful when evaluating memory usage for stuff like strings versus char arrays or seeing just how much making some variables static helps.

The source code is here.

3 Likes