port: mmap offset alignment on Windows
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 17 Sep 2019 18:31:37 +0000 (14:31 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 3 Oct 2019 14:45:11 +0000 (10:45 -0400)
commitc8ebf034d0bcdfe9a716d1697b02b307e4ee4514
tree8fd6a7e79802f4ab1f2c2a19c42d42d3da3d6ff2
parentb5ba8abccb3ce6f65850a918d40781eda51ab8d8
port: mmap offset alignment on Windows

On Windows the mmap offset is not aligned to the page size but to the
allocator granularity which is usually bigger than the page size. Add a new
internal function to the mmap compat code to get the proper offset alignment
size for each platform.

See the "dwFileOffsetLow" section for more details :
https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-mapviewoffile

Change-Id: Ic26dc53862719892738a88b3dcea6a15901a0c94
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2107
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
src/common/mmap-align.h
src/compat/mman.c
src/compat/mman.h
src/plugins/ctf/fs-src/data-stream-file.c
This page took 0.025701 seconds and 4 git commands to generate.