remove malloc/free use stack