Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 99713 | Differences between
and this patch

Collapse All | Expand All

(-)ntp-stable-4.2.0a-20040617/ntpd/ntpd.c.0 (+10 lines)
Lines 691-696 Link Here
691
				"Cannot adjust stack limit for mlockall: %m");
691
				"Cannot adjust stack limit for mlockall: %m");
692
		    }
692
		    }
693
	    }
693
	    }
694
	    /*
695
	     * The default RLIMIT_MEMLOCK is very low on Linux systems.
696
	     * Unless we increase this limit malloc calls are likely to
697
	     * fail if we drop root privlege.  To be useful the value
698
	     * has to be larger than the largest ntpd resident set size.
699
	     */
700
	    rl.rlim_cur = rl.rlim_max = 32*1024*1024;
701
	    if (setrlimit(RLIMIT_MEMLOCK, &rl) == -1) {
702
	    	msyslog(LOG_ERR, "Cannot set RLIMIT_MEMLOCK: %m");
703
	    }
694
	}
704
	}
695
# endif /* HAVE_SETRLIMIT */
705
# endif /* HAVE_SETRLIMIT */
696
	/*
706
	/*

Return to bug 99713