diff options
author | June McEnroe <june@causal.agency> | 2019-01-07 00:33:52 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-01-07 00:33:52 -0500 |
commit | 966500b7c047c23b8dc0f729e7d2daba7700f11d (patch) | |
tree | d285cf9404d29c0ec317fdfd3c27f0eff902e80b | |
parent | Add license notice to explore JavaScript (diff) | |
download | torus-966500b7c047c23b8dc0f729e7d2daba7700f11d.tar.gz torus-966500b7c047c23b8dc0f729e7d2daba7700f11d.zip |
madvise MADV_NOCORE in image
Diffstat (limited to '')
-rw-r--r-- | image.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/image.c b/image.c index 1cc298f..ef77906 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) { |