port: mmap offset alignment on Windows
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 17 Sep 2019 18:31:37 +0000 (14:31 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 30 Sep 2019 19:31:09 +0000 (15:31 -0400)
commit3b16a19b790b255ac0ca7561279b258589b58cbe
tree9472f0e9e1b73e2ff265c5b4935cb30104ef1a1e
parent365a0459f07eef1c2b81516cb87ae562b28373f4
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.024668 seconds and 4 git commands to generate.