AnsweredAssumed Answered

MQX - How to determine amount of "heap" remaining?

Question asked by David Rodgers on Mar 24, 2014
Latest reply on Mar 24, 2014 by Martin Latal

Simple question... is there a way to determine how much memory remains in the default system pool during runtime?  I've read through the MQX Reference Manual, but I can't seem to find a relevant function for determining how much system memory remains.  For reference, I'm allocating memory with _lwmem_alloc_system(), and freeing with _lwmem_free().  We're running up against memory limitations in our current project, but the only way we know this is when a task fails to launch (because MQX could not allocate stack for it) or when MFS fails to initialize (because there isn't enough memory to init the filesystem).  It would be extremely useful to know how much memory remains without having to tweak numbers and recompile until something works.  Thanks.

 

David

Outcomes