mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
add mlockall
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1584 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -20,6 +20,12 @@
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `mlock' function. */
|
||||
#undef HAVE_MLOCK
|
||||
|
||||
/* Define to 1 if you have the `mlockall' function. */
|
||||
#undef HAVE_MLOCKALL
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user