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

Re: Limit memory consumption of an ad hoc process

Victor Sudakov wrote:
> FreeBSD has a simple way to run some ad-hoc program with memory limits:
> $ limits -m 2G ./mytest
>   memoryuse             2097152 kB
>   vmemoryuse           infinity kB
> $ limits -m 1G ./mytest
>   memoryuse             1048576 kB
>   vmemoryuse           infinity kB
> How do I do the same in Linux (without root permissions)?

The short answer is /usr/bin/prlimit, it's the direct equivalent of
FreeBSD's /usr/bin/limits wrapper.

Thanks to all who replied especially Greg Wooledge!

Victor Sudakov VAS4-RIPE

Attachment: signature.asc
Description: PGP signature

Reply to: