summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel De Graaf <danieldg@inspircd.org>2011-03-03 21:22:56 -0500
committerDaniel De Graaf <danieldg@inspircd.org>2011-03-03 21:24:05 -0500
commit70cd4a5a06ea4251ca128636e17bf5ff385f9b5b (patch)
tree3085719ea94da4bb6ba412fbc468ea0aeba7b202 /src
parent58e8147b37c9069dec115185b7392fc09528b4ad (diff)
Fix excessive memory use in kqueue
The maximum number of file descriptors was incorrectly using the OS maximum, not the process maximum. Thanks to Liath for finding & testing.
Diffstat (limited to 'src')
-rw-r--r--src/socketengines/socketengine_kqueue.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp
index 33a33b96a..c1aa0c6ee 100644
--- a/src/socketengines/socketengine_kqueue.cpp
+++ b/src/socketengines/socketengine_kqueue.cpp
@@ -54,7 +54,7 @@ KQueueEngine::KQueueEngine()
size_t len;
mib[0] = CTL_KERN;
- mib[1] = KERN_MAXFILES;
+ mib[1] = KERN_MAXFILESPERPROC;
len = sizeof(MAX_DESCRIPTORS);
sysctl(mib, 2, &MAX_DESCRIPTORS, &len, NULL, 0);
if (MAX_DESCRIPTORS <= 0)