Revert:Add function to profile memory