Using profiling tools to understand and debug memory usage