 In case the system runs out of both memory and swap even the OS might crash causing the whole system to reboot.Programs written in programming languages that use a garbage collector (e.g.Java) usually rely on this feature for avoiding memory leaks.