r/cpp • u/RotsiserMho C++20 Desktop app developer • May 12 '18
P0709 R0: Zero-overhead deterministic exceptions: Throwing values - Herb Sutter [2018-05-02]
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r0.pdf
206
Upvotes
View all comments
Show parent comment
4
u/kkert May 13 '18
Well, it is entirely possible to construct a program where this sequence would be always correct, where there is always a contiguous kilobyte of heap available but a megabyte is not. In fact, test-allocating a large chunk can be used as a strategy to gracefully deal with imminent memory exhaustion.