1 /* Called by pr68078. */ 2 3 #include <stdio.h> 4 #include <stdlib.h> 5 #include <sys/time.h> 6 #include <sys/resource.h> 7 8 void set_vm_limit(int vm_limit)9set_vm_limit (int vm_limit) 10 { 11 struct rlimit rl = { vm_limit, RLIM_INFINITY }; 12 int r; 13 14 r = setrlimit (RLIMIT_AS, &rl); 15 if (r) 16 { 17 perror ("set_vm_limit"); 18 exit (1); 19 } 20 21 return; 22 } 23