sync memset from 3.10