Kill task closest in size to memory needed to free

Change-Id: I456da56447f453c913b77f22d6115c12a1a66804