copy data into supplied memory resource