add mlockall

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1584 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-06-09 15:39:12 +00:00
parent f7e6e52855
commit d607494ac0
5 changed files with 292 additions and 222 deletions

View File

@@ -32,6 +32,9 @@
#include <switch.h>
#include <switch_version.h>
#ifdef HAVE_MLOCKALL
#include <sys/mman.h>
#endif
static int RUNNING = 0;
@@ -81,6 +84,10 @@ int main(int argc, char *argv[])
//nice(-20);
#endif
#ifdef HAVE_MLOCKALL
mlockall(MCL_CURRENT|MCL_FUTURE);
#endif
#ifndef WIN32
if (argv[1] && !strcmp(argv[1], "-stop")) {
pid_t pid = 0;