On Saturday, 20 February 2016 at 14:21:28 UTC, tcak wrote:
What happens if memory allocation fails with "new" keyword?
Be aware that memory allocation might never actually fail. It really depends on the operating system.
But if it did fail, it would throw OutOfMemoryError http://dpldocs.info/experimental-docs/core.exception.OutOfMemoryError.html