summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2017-07-31 23:22:21 -0400
committerJune McEnroe <june@causal.agency>2017-07-31 23:22:21 -0400
commit071962a0700f6ed344d91b724b7dc3c7a3b0b426 (patch)
tree658dce53879e3adcfba5f39e73e5cccf86756288
parentUse designated initializers for messages (diff)
downloadtorus-071962a0700f6ed344d91b724b7dc3c7a3b0b426.tar.gz
torus-071962a0700f6ed344d91b724b7dc3c7a3b0b426.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) {
w=1'>Check that password is hashedJune McEnroe 2019-11-08Avoid calling getopt_long again after it returns -1June McEnroe 2019-11-08Only change AWAY status for registered clientsJune McEnroe 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe