port: mmap offset alignment on Windows
[babeltrace.git] / src / compat / mman.c
index 1a7638c98381e0d6511a3a78f597e43015d90df7..d2019d2bd2d6ed2a81679ba287db43b0754739df 100644 (file)
@@ -300,4 +300,17 @@ end:
        return ret;
 }
 
+BT_HIDDEN
+size_t bt_mmap_get_offset_align_size(int log_level)
+{
+       SYSTEM_INFO sysinfo;
+
+       GetNativeSystemInfo(&sysinfo);
+       BT_LOG_WRITE_CUR_LVL(BT_LOG_DEBUG, log_level, BT_LOG_TAG,
+               "Allocator granularity is %lu.",
+               sysinfo.dwAllocationGranularity);
+
+       return sysinfo.dwAllocationGranularity;
+}
+
 #endif
This page took 0.0258 seconds and 4 git commands to generate.