Use profiler to track memory usage