mem_monitor function

Monitor Memory Usage During Function Execution