get memcpy out of write lock due to its high latency not acceptable.