use mem()
Merge pull request #268 from will123195/2.2

use mem()