[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Limit memory consumption of an ad hoc process



On Mon, Jul 05, 2021 at 11:11:06PM -0400, Greg Wooledge wrote:
> > > $ prlimit --as=1048576 /bin/ls
> > > /bin/ls: error while loading shared libraries: libselinux.so.1: failed to map segment from shared object
> 
> Sounds like you set it too low.  Remember, setrlimit(2) and prlimit(2)
> say that RLIMIT_DATA is specified in bytes.  This is not the same as
> bash's ulimit.

... and the same for RLIMIT_AS which is probably what you're using.

It would be incredibly useful if the various shell-interface tools
(ulimit, prlimit, and so on) would explicitly say which setrlimit(2)
resource they're actually using, instead of forcing us to guess.


Reply to: