add some function for core memory manage