arhuaco / ram-is-mine

Enforce RAM usage limit for programs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ram-is-mine

Ensure that programs do not use more RAM memory than they are allowed to.

Some programs have their own malloc implementations and they do not return RAM to the OS.

I wanted to try this way. I could try to use ulimit and run the process with its own user, but I think it will be handy to have this program around.

It will add a bit of overhead for small allocations. This will be optimized later.

Usage

MY_RAM_LIMIT=$((1024*1024*1024*2)) LD_PRELOAD_64=./ram-is-mine.so LD_PRELOAD=./ram-is-mine.so test_1

Replace test_1 with your program.

Status

Unstable. It will crash your computer and kill the cat.

It is not released yet, it should be completed soon.

Build UNIX

Requirements:

Tested in Ubuntu 14.04.

Credits

About

Enforce RAM usage limit for programs.

License:GNU General Public License v2.0


Languages

Language:C 97.0%Language:Makefile 1.6%Language:Python 1.3%Language:Shell 0.1%