Assuming you are programming that 32-bit microcontroller in C, obtaining of such information could be done through compiler directives whose syntax may vary from one compiler to another. Anyway, this information is absolutely useless at all on this programming language, since the management of the memory allocation is done through the compiler itself. The only information that would make sense you know on this regard is how much free SDRAM memory remains in runtime.