Problem using SD card reader on arduino MEGA 2560 shield

The SD library needs to allocate 512 bytes of ram for a buffer, so you are going to need to free up some memory on the UNO.