Improve malloc/free
Improve malloc/free