627. Low memory and exceptions

Section: [new.delete.single] Status: NAD Submitter: P.J. Plauger Opened: 2007-01-23 Last modified: 2016-01-28 10:19:27 UTC

Priority: Not Prioritized

View other active issues in [new.delete.single].

View all other issues in [new.delete.single].

View all issues with NAD status.


I recognize the need for nothrow guarantees in the exception reporting mechanism, but I strongly believe that implementors also need an escape hatch when memory gets really low. (Like, there's not enough heap to construct and copy exception objects, or not enough stack to process the throw.) I'd like to think we can put this escape hatch in [new.delete.single], operator new, but I'm not sure how to do it. We need more than a footnote, but the wording has to be a bit vague. The idea is that if new can't allocate something sufficiently small, it has the right to abort/call terminate/call unexpected.

[ Bellevue: NAD. 1.4p2 specifies a program must behave correctly "within its resource limits", so no further escape hatch is necessary. ]

Proposed resolution: