Samsung Electronics interview question

How can you write a program that returns all the empty memory addresses present in the system(RAM)???