Different process, so we need to ensure we can write to them
properly.
Signed-off-by: Jens Axboe <axboe@fb.com>
cur_log = flist_first_entry(&log->io_logs, struct io_logs, list);
flist_del_init(&cur_log->list);
flush_samples(f, cur_log->log, cur_log->nr_samples * log_entry_sz(log));
+ sfree(cur_log);
}
fclose(f);
#include "lib/pow2.h"
#include "lib/output_buffer.h"
#include "helper_thread.h"
+#include "smalloc.h"
struct fio_mutex *stat_mutex;
new_size = new_samples * log_entry_sz(iolog);
- cur_log = malloc(sizeof(*cur_log));
+ cur_log = smalloc(sizeof(*cur_log));
if (cur_log) {
INIT_FLIST_HEAD(&cur_log->list);
cur_log->log = malloc(new_size);
iolog->cur_log_max = new_samples;
return cur_log;
}
- free(cur_log);
+ sfree(cur_log);
}
return NULL;