fix: io_uring sqpoll issue_time empty when kernel not yet read sq
[fio.git] / engines / solarisaio.c
index 21e95935b20bdc387a41f5c176fd806ff3c8f504..b2b47fede675c8cef09e4b921297d3e4a6bed27f 100644 (file)
@@ -185,8 +185,9 @@ static void fio_solarisaio_init_sigio(void)
 
 static int fio_solarisaio_init(struct thread_data *td)
 {
-       struct solarisaio_data *sd = malloc(sizeof(*sd));
        unsigned int max_depth;
+       struct solarisaio_data *sd;
+       sd = calloc(1, sizeof(*sd));
 
        max_depth = td->o.iodepth;
        if (max_depth > MAXASYNCHIO) {
@@ -195,9 +196,7 @@ static int fio_solarisaio_init(struct thread_data *td)
                                                        max_depth);
        }
 
-       memset(sd, 0, sizeof(*sd));
-       sd->aio_events = malloc(max_depth * sizeof(struct io_u *));
-       memset(sd->aio_events, 0, max_depth * sizeof(struct io_u *));
+       sd->aio_events = calloc(max_depth, sizeof(struct io_u *));
        sd->max_depth = max_depth;
 
 #ifdef USE_SIGNAL_COMPLETIONS