Use a private mmap buffer for streams

This commit is contained in:
Rodrigo Arias 2021-12-16 14:21:20 +01:00
parent 676576f347
commit 12d35b1d46

View File

@ -448,7 +448,7 @@ load_stream_buf(struct ovni_stream *stream, struct ovni_ethread *thread)
stream->size = st.st_size; stream->size = st.st_size;
stream->buf = mmap(NULL, stream->size, PROT_READ | PROT_WRITE, stream->buf = mmap(NULL, stream->size, PROT_READ | PROT_WRITE,
MAP_SHARED, fd, 0); MAP_PRIVATE, fd, 0);
if(stream->buf == MAP_FAILED) if(stream->buf == MAP_FAILED)
{ {