Performance of heap allocations

Before you profile an application, you should ensure that it's free of memory errors. You can use the IDE tools to find these errors, as explained in Finding memory errors and leaks.

You can perform heap memory profiling to achieve two goals: performance improvements (because heap memory allocation/deallocation is one of the most expensive ways of obtaining memory), and heap memory optimization. The Memory Analysis tool assists you with both goals.