use qemu_malloc and friends consistently
Quoted 3 lines · ----- "Glauber Costa
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 differences.
Quoted 5 lines
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.