X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=memory.c;h=b208320c5d88cc619f7167626e3b7502ded07799;hp=f1cd2d770f4cbe3597ecbc5e236b355e930fc49a;hb=c4ec0a1d623193b4d344e31b07c6720ecf90323f;hpb=8ea39c32d29428b17bfe9c806fc33f0c8adfe118 diff --git a/memory.c b/memory.c index f1cd2d77..b208320c 100644 --- a/memory.c +++ b/memory.c @@ -5,12 +5,12 @@ #include #include #include -#ifndef FIO_NO_HAVE_SHM_H -#include -#endif #include #include "fio.h" +#ifndef FIO_NO_HAVE_SHM_H +#include +#endif void fio_unpin_memory(struct thread_data *td) { @@ -209,7 +209,7 @@ int allocate_io_mem(struct thread_data *td) total_mem = td->orig_buffer_size; - if (td->o.odirect || td->o.mem_align || + if (td->o.odirect || td->o.mem_align || td->o.oatomic || (td->io_ops->flags & FIO_MEMALIGN)) { total_mem += page_mask; if (td->o.mem_align && td->o.mem_align > page_size) @@ -240,7 +240,7 @@ void free_io_mem(struct thread_data *td) unsigned int total_mem; total_mem = td->orig_buffer_size; - if (td->o.odirect) + if (td->o.odirect || td->o.oatomic) total_mem += page_mask; if (td->o.mem_type == MEM_MALLOC)