Fill memory with some suitable pattern and read it back. It is more complicated if you also want to find data bus errors.
The brute force approach to this is to use a "walking" pattern. You basically change one bit at time and verify the complete memory after each write.
That is probably overkill in most cases.