Samsung Electronics Interview Question

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