From 5e1eef754cb3a09f083577d3e934af583a56337d Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Mon, 7 Jan 2019 00:33:52 -0500 Subject: madvise MADV_NOCORE in image --- image.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/image.c b/image.c index 2cfc340..de27349 100644 --- a/image.c +++ b/image.c @@ -119,6 +119,11 @@ static void tilesMap(const char *path) { error = madvise(tiles, TilesSize, MADV_RANDOM); if (error) err(EX_OSERR, "madvise"); + +#ifdef MADV_NOCORE + error = madvise(tiles, TilesSize, MADV_NOCORE); + if (error) err(EX_OSERR, "madvise"); +#endif } static void render(FILE *stream, uint32_t tileX, uint32_t tileY) { -- cgit 1.4.1