[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently

From: jcd
Subject: Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently
Date: Fri, 29 May 2009 15:46:29 +0100 (GMT+01:00)

----- "Glauber Costa" <address@hidden> a écrit :

> If we have to start programming like this because we don't trust our
> programmers,
> (ultimately, ourselves), then we're pretty much doomed.

This is not that bad: 

It is just like having a "coding rule" on the qemu project stating that 
malloc(0) is forbiden (even if legal) and BTW it is also enforced in the 
qemu_malloc() implementation that should always be used.

OTOH if we believe all the contributed code (past, present and furure) is 
always perfect then the all qemu_malloc/qemu_free ... scheme can just be 
discarded (it adds to the complexity and decreases perf) and we go back to 
plain malloc/free trusting the programmer to know about the subtle platform 

> If anyone is contributing code to qemu these days, chances are that
> his code will
> get reviewed. We'll then spot those things and kick them out. That's
> the only 
> reasonable way to get quality.

Reviews are good and still needed but it doesn't hurt to also have some tools 
to catch corner cases that can be easily missed.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]