Enabling SamplerThread to profile memory usage