added test_memcpy
fixed an out-of-bound copy bug in gmm_dtoh