From 6d3ea7e072cca64edd652cf7a4973648f85c1cc5 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Mon, 31 Jul 2017 23:22:21 -0400 Subject: Don't dump tiles in core --- server.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.c b/server.c index a32ada5..9724359 100755 --- a/server.c +++ b/server.c @@ -34,6 +34,11 @@ static void tilesMap(void) { tiles = mmap(NULL, TILES_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (tiles == MAP_FAILED) err(EX_OSERR, "mmap"); + +#ifdef MADV_NOCORE + error = madvise(tiles, TILES_SIZE, MADV_NOCORE); + if (error) err(EX_OSERR, "madvise"); +#endif } static struct Tile *tileGet(uint32_t tileX, uint32_t tileY) { -- cgit 1.4.1