Use memcpy where appropriate.