Fix memcpy and memcmp size bugs

The last parameter of `memcpy` and `memcmp` should be numbers of byte, fixed by added `* sizeof(T)`.