remove for-loop under memset