Removing dependency to malloc/free.