Add support to record new and malloc in same time.