tracing: Have trace_array keep track if snapshot buffer is allocated