aboutsummaryrefslogtreecommitdiff
path: root/src/socketengines/socketengine_kqueue.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2011-03-03 21:22:56 -0500
committerGravatar Daniel De Graaf2011-03-03 21:25:05 -0500
commitd0c7cd4b9a5933b65aaca3978298627c3026b63c (patch)
treefa6aa8a209980ae3f299167b44ce5aad83ce195f /src/socketengines/socketengine_kqueue.cpp
parentFix bug where an empty parameter is generated when input to a tokenstream end... (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/socketengines/socketengine_kqueue.cpp')
-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 bf09eaf74..3f36734e0 100644
--- a/src/socketengines/socketengine_kqueue.cpp
+++ b/src/socketengines/socketengine_kqueue.cpp
@@ -146,7 +146,7 @@ int KQueueEngine::GetMaxFds()
size_t len;
mib[0] = CTL_KERN;
- mib[1] = KERN_MAXFILES;
+ mib[1] = KERN_MAXFILESPERPROC;
len = sizeof(maxfiles);
sysctl(mib, 2, &maxfiles, &len, NULL, 0);
MAX_DESCRIPTORS = maxfiles;