优化memset调用 (reverse-merged from commit 6eb0df755b4ba3632cef54ca9e531033c05d0011)