Port fix: Windows does not allow read-only mappings > file's size
[babeltrace.git] / plugins / ctf / fs-src / data-stream-file.c
index 76ea9ad502939758176908b41e15c09a54650901..bae0bd14bdda1eca1a9849500c582412944c7b87 100644 (file)
@@ -92,6 +92,11 @@ enum bt_ctf_notif_iter_medium_status ds_file_mmap_next(
                        goto error;
                }
 
+               /*
+                * mmap_valid_len is guaranteed to be page-aligned except on the
+                * last mapping where it may not be possible (since the file's
+                * size itself may not be a page multiple).
+                */
                ds_file->mmap_offset += ds_file->mmap_valid_len;
                ds_file->request_offset = 0;
        }
This page took 0.022781 seconds and 4 git commands to generate.