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.


r~

Reply via email to