[WooreeINFO] How to know the SRAM usage of a Java application?

Dear MicroEJ,

We’ve been doing a migration of our Java application from OpenJDK to MicroEJ/ Java VM, on top of STM32F746G-DISCO, and i’d like to know how much SRAM, including the external one, is required for our application to run.

Could you please advise me how to achieve this measurement?

Thanks & Regards
YH Kwon

Hi @kwonyh,

You can use the profiler library to determine the memory consumption of your application. I advise to use the HeapProfiler [1]. You can run your application with a profiler and display how much RAM is used during the execution. You can then adjust the needed Java heap in the Run Configuration launcher of your application.


[1] https://developer.microej.com/javadoc/microej_4.1/addons/com/microej/profiling/profiler/HeapProfiler.html