How to issue a c++ termination catch without a OOM killer
问题 I am learning about exceptions from a book and try/catch and the OS should terminate the following program. The book says, the message terminate called after throwing an instance of 'std::bad_alloc' should show up. But doesn't. I am using Arch Linux and the program is not stopping. It runs, fills the RAM a bit linear until it doesn't (at about 90%), the processor is working a lot but no freezing and no terminating. Is this a Windows only use case or how could I reproduce the error on a Linux