optimize buffer use

N/A

Change-Id: I759fec1f6083b882cab70afabb1e9f98f720b9b4
Signed-off-by: liuhuahang <liuhuahang@zerus.co>