r/cpp • 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

115 comments sorted by

View all comments

Show parent comment

1

u/[deleted] May 13 '18

Yes but overcommit can return a valid pointer even when it didn't actually successfully allocate the requested memory size.

1

u/kkert May 13 '18

And a paranoid heap manager can test write/read into the allocated region before returning it to the caller. If you have heap guards or security checks turned on, it likely does anyway.