#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#ifndef FIO_NO_HAVE_SHM_H
-#include <sys/shm.h>
-#endif
#include <sys/mman.h>
#include "fio.h"
+#ifndef FIO_NO_HAVE_SHM_H
+#include <sys/shm.h>
+#endif
void fio_unpin_memory(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)
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)