modified memset, memcpy. some regression tests time out