stack without memcpy