[patch] No allocation for empty unordered containers
Tue Sep 9 21:03:00 GMT 2014
On 09/09/2014 19:29, Jonathan Wakely wrote:
> On 14/08/14 21:22 +0200, FranÃ§ois Dumont wrote:
>> I am preparing a patch for profile mode so I will submit modification
>> for this mode with this big patch.
> btw, FranÃ§ois, for profile mode I think we should just do something
> like this patch.
> I feel quite strongly that if using Debug Mode or Profile Mode makes
> your program run out of memory where it wouldn't usually fail, then
> terminating is reasonable. The point of Profile Mode is not to test
> abnormal execution of your program because that won't give you useful
> profile information for the normal case.
> It's more important for the noexcept specification to be consistent
> across normal/debug/profile modes than for profile mode to fail
> gracefully via bad_alloc in out-of-memory scenarios.
Sure, no problem. In the patch I am preparing for profile mode
failure in allocation will just mean that the involved container won't
be profiled so that I can add noexcept wherever it is needed for
consistency with normal mode. I hope to be able to submit this patch in
a week or two.
More information about the Gcc-patches