On 10/03/2012 04:54 PM, Kenneth Graunke wrote:
> On 09/28/2012 10:44 AM, Chad Versace wrote:
>> Memory allocation should rarely fail, but when it does the test should
>> immediately abort and explain why. This patch defines two utility wrapper
>> functions, piglit_malloc() and piglit_calloc(), that do exactly that when
>> allocation fails.
>>
>> Signed-off-by: Chad Versace <[email protected]>
>> ---


> I am really not a fan of malloc/calloc wrappers.  This change is
> well-intentioned, but I don't believe I've ever seen this work out in 
> practice.
> 
> Mesa used to have malloc wrappers.  We removed them.  X has wrappers. People
> always wonder whether they have to use Xfree/Xmalloc or if they can just use
> plain malloc/free.  People wonder what the difference is. At the end of the 
> day,
> projects don't end up using them consistently, at which point it's 
> questionable
> whether it's worth having them.
> 
> If a program runs out of memory, it will likely die.  In my experience, it's 
> not
> hard to tell when that happens.
> 
> Nacked-by: Kenneth Graunke <[email protected]>

Fair enough. I'll remove this patch.

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to