Anyone know code to get the currently used memory. I want to get the total memory used in a function, so I thought I would get the memory before the function executes, and then subtract this from the memory after the function is complete.

Thanks!