diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/framebuffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/framebuffer.c b/src/framebuffer.c index 6a6d76a..05ada4a 100644 --- a/src/framebuffer.c +++ b/src/framebuffer.c @@ -51,6 +51,8 @@ int main() height = var_info.yres; inv_width = 1 / (double)width; + posix_fadvise(fd, 0, (size_t)(width * height * 4), + POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE | POSIX_FADV_WILLNEED); mem = mmap(NULL, (size_t)(width * height * 4), PROT_READ, MAP_SHARED, fd, (off_t)0); if (mem == MAP_FAILED) return perror("get-luminosity::framebuffer: mmap"), close(fd), 1; |