How Do I Know the Actual Memory Used for Function Execution?

The returned information about a function contains the maximum memory consumed. Alternatively, check the memory usage in the execution result.