Hi Alberto,
high consumption of memory through sm04.
It would be nice to follow SAP doc at The ABAP Memory Inspector - Test and Analysis Tools in ABAP - SAP Library
and Starting the Memory Inspector - ABAP - Analysis Tools - SAP Library
additionally consider the tools ST03N and ST02 transactions as already suggested to you by Divyanshu
Hope this will be helpful for you.
Regards,
Gaurav Rana