about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2017-07-31 23:22:21 -0400
committerJune McEnroe <programble@gmail.com>2017-07-31 23:22:21 -0400
commit6d3ea7e072cca64edd652cf7a4973648f85c1cc5 (patch)
tree90cf03d469fec6b23da2bbfa94efb35902520d51
parentUse designated initializers for messages (diff)
downloadtorus-6d3ea7e072cca64edd652cf7a4973648f85c1cc5.tar.gz
torus-6d3ea7e072cca64edd652cf7a4973648f85c1cc5.zip
Don't dump tiles in core
Diffstat (limited to '')
-rwxr-xr-xserver.c5
1 files changed, 5 insertions, 0 deletions
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) {
r> 2020-06-03Add The Song of AchillesJune McEnroe 2020-06-01Allow redirecting input in everJune McEnroe 2020-05-31Add %c conversion to c scriptJune McEnroe 2020-05-31Add c script to READMEJune McEnroe 2020-05-31Add c scriptJune McEnroe 2020-05-31Update mdoc source URLsJune McEnroe 2020-05-26Remove unfinished PSF fontsJune McEnroe