[Mesa-dev] [PATCH] i965: Use new/delete instead of realloc() in brw_ir_allocator.h

Francisco Jerez currojerez at riseup.net
Wed Feb 11 12:15:05 PST 2015


Matt Turner <mattst88 at gmail.com> writes:
>[...]
> Indeed. And another thing to consider is that we've discussed
> compiling with -fno-exceptions.
>

Heh, the benefit you get from doing that is virtually zero.  And in
cases like this where failure would have to be handled many levels up in
the stack and require redesigning an interface used in hundreds of
places making it more awkward to use, not using exceptions is a really
strong incentive not to handle failure at all.  I cannot see any better
solution here other than throwing an exception or letting the program
segfault.

> I think it's okay to add out-of-memory checks where we can reasonably
> do something about them, but code churn *just* to silence a tool (one
> that I'm not aware of catching any meaningful bugs) doesn't seem good.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150211/f6a02860/attachment.sig>


More information about the mesa-dev mailing list