Skip to content

Commit

Permalink
https://github.com/samboy/MaraDNS/issues/52 Double max_mem default value
Browse files Browse the repository at this point in the history
  • Loading branch information
samboy committed Jan 7, 2019
1 parent 70e7233 commit 1d9cf47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/MaraDNS.c
@@ -1,4 +1,4 @@
/* Copyright (c) 2002-2011 Sam Trenholme
/* Copyright (c) 2002-2019 Sam Trenholme
*
* TERMS
*
Expand Down Expand Up @@ -4446,8 +4446,8 @@ int main(int argc, char **argv) {
/* Limit the maximum amount of memory we can allocate, in
* bytes */
maxprocs = read_numeric_kvar("max_mem",
1048576 + thread_overhead +
((cache_size + dns_records_served) * 1536));
2097072 + thread_overhead +
((cache_size + dns_records_served) * 3072));
if(maxprocs < 262144 && maxprocs > 0) { maxprocs = 262144; }
if(maxprocs > 0) {
rlim.rlim_cur = rlim.rlim_max = maxprocs;
Expand Down

0 comments on commit 1d9cf47

Please sign in to comment.