#include "fio.h"
#include "flist.h"
#include "workqueue.h"
+#include "smalloc.h"
enum {
SW_F_IDLE = 1 << 0,
}
} while (shutdown && shutdown != wq->max_workers);
- free(wq->workers);
+ sfree(wq->workers);
wq->workers = NULL;
pthread_mutex_destroy(&wq->flush_lock);
pthread_cond_destroy(&wq->flush_cond);
pthread_mutex_init(&wq->flush_lock, NULL);
pthread_mutex_init(&wq->stat_lock, NULL);
- wq->workers = calloc(wq->max_workers, sizeof(struct submit_worker));
+ wq->workers = smalloc(wq->max_workers * sizeof(struct submit_worker));
for (i = 0; i < wq->max_workers; i++)
if (start_worker(wq, i, sk_out))