Joe Buck writes:
>If a check were to be implemented, the right thing to do would be to throw
>bad_alloc (for the default new) or return 0 (for the nothrow new).

What do you do if the user has defined his own operator new that does
something else?

>There cases where the penalty for this check could have
>an impact, like for pool allocators that are otherwise very cheap.
>If so, there could be a flag to suppress the check.

Excessive code size growth could also be problem for some programs.

                                        Ross Ridge

Reply via email to