aboutsummaryrefslogtreecommitdiff
path: root/pd/src/s_inter.c
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2005-05-30 03:04:19 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2005-05-30 03:04:19 +0000
commit05607e31243e5e85a3801d4513192bb1f2150b14 (patch)
tree0f810a621cb9967e1e53b349410b0d07be0cea13 /pd/src/s_inter.c
parent47729b52cb85e8a52bf2e6bbf8ee9a810ed331e1 (diff)
Remembered to update all the edited files. Should now be in sync... will
have to test it though. svn path=/trunk/; revision=3092
Diffstat (limited to 'pd/src/s_inter.c')
-rw-r--r--pd/src/s_inter.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pd/src/s_inter.c b/pd/src/s_inter.c
index 3a659080..f95dbc50 100644
--- a/pd/src/s_inter.c
+++ b/pd/src/s_inter.c
@@ -18,6 +18,7 @@ that didn't really belong anywhere. */
#include <stdlib.h>
#include <sys/time.h>
#include <sys/mman.h>
+#include <sys/resource.h>
#endif
#ifdef HAVE_BSTRING_H
#include <bstring.h>
@@ -278,6 +279,12 @@ void sys_set_priority(int higher)
#endif
#ifdef _POSIX_MEMLOCK
+ /* tb: force memlock to physical memory { */
+ struct rlimit mlock_limit;
+ mlock_limit.rlim_cur=0;
+ mlock_limit.rlim_max=0;
+ setrlimit(RLIMIT_MEMLOCK,&mlock_limit);
+ /* } tb */
if (mlockall(MCL_FUTURE) != -1)
fprintf(stderr, "memory locking enabled.\n");
#endif