Heap profiling: flush .hp file at the end of each frame