Fix: lazy-mmap() streams when flushing
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 28 Jan 2015 22:07:35 +0000 (17:07 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 28 Jan 2015 22:07:35 +0000 (17:07 -0500)
commit28362f2bcb7fe869c6bc1b078ceab41483fd69a6
tree242b195e3c7fb858003d2f416086a0376f3a3df7
parent29d9d76c476cbf3fdf6fa709bfbdc24309974f06
Fix: lazy-mmap() streams when flushing

This fixes an issue when empty streams are created as the stream
creation will mmap() the file in preparation for the first event.

This results in "empty" stream files ending up with a non-zero size
which is invalid since no packet headers are found by the reader.

This change ensures that stream files are only mmap'ed on the first
stream flush and that empty streams are stored as size-0 files.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ctf.c
formats/ctf/ir/stream.c
This page took 0.024845 seconds and 4 git commands to generate.