Richard Henderson writes: > On 09/21/2011 08:50 AM, Lluís Vilanova wrote: >> + void *complex = NULL; >> + if (!size && !allow_zero_malloc()) { >> + abort(); >> + } >> + ptr = oom_check(malloc(size ? size : 1)); >> + #if trace_qemu_malloc_enabled >> + /* some complex computations to produce the 'complex' value */ >> + #endif >> + trace_qemu_malloc(size, ptr, complex); /* <-- trace event */
> That's just ugly. Surely something like > if (trace_qemu_malloc_enabled) { > void *complex; > /* some complex computations to produce the 'complex' value */ > trace_qemu_malloc(size, ptr, complex); > } > be a better example to set. True XD I'll send a new version, thanks. Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth