On Friday, October 29, 2021 at 9:03:32 PM UTC Ian MacArthur wrote:
Question: Have you ever seen that happen?
On OpenBSD I do see it every so often because they have a particularly spartan ulimit. However what sets it off is usually fringe software such as debug allocators, VMs and very large things like web browsers. In my day to day software, if I was to hit OOM, it usually means I am doing something wrong admittedly.
In C, I either sleep until memory gets released elsewhere (admittedly this doesn't help the limits set by ulimit) or I simply abort().
However, my slight concern is that operator new just fires out an exception and the stack unwinds as it propagates. I would personally prefer an abort().
can not be honoured by the MMU at point of use, you can get tricky (and hard to debug) faults “elsewhere” in the program at runtime.
This is true. Non-deterministic things like this make me shudder ;)
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.