05dd33cd01
OK jasper@
20 lines
787 B
Plaintext
20 lines
787 B
Plaintext
$OpenBSD: patch-simp_Main_cc,v 1.1 2010/08/19 14:19:22 edd Exp $
|
|
|
|
OpenBSD has no RLIMIT_AS
|
|
|
|
--- simp/Main.cc.orig Thu Aug 19 14:34:45 2010
|
|
+++ simp/Main.cc Thu Aug 19 14:35:07 2010
|
|
@@ -116,10 +116,10 @@ int main(int argc, char** argv)
|
|
if (mem_lim != INT32_MAX){
|
|
rlim_t new_mem_lim = (rlim_t)mem_lim * 1024*1024;
|
|
rlimit rl;
|
|
- getrlimit(RLIMIT_AS, &rl);
|
|
+ getrlimit(RLIMIT_DATA, &rl);
|
|
if (rl.rlim_max == RLIM_INFINITY || new_mem_lim < rl.rlim_max){
|
|
rl.rlim_cur = new_mem_lim;
|
|
- if (setrlimit(RLIMIT_AS, &rl) == -1)
|
|
+ if (setrlimit(RLIMIT_DATA, &rl) == -1)
|
|
printf("WARNING! Could not set resource limit: Virtual memory.\n");
|
|
} }
|
|
|