Skip to content

Commit

Permalink
Fix excessive memory use in kqueue
Browse files Browse the repository at this point in the history
The maximum number of file descriptors was incorrectly using the OS maximum,
not the process maximum. Thanks to Liath for finding & testing.
  • Loading branch information
Daniel De Graaf committed Mar 4, 2011
1 parent 58e8147 commit 70cd4a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/socketengines/socketengine_kqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 70cd4a5

Please sign in to comment.