Shameless plug: I needed to run multiple instances of a binary while limiting the memory footprint (memory + swap) for each instance, so I wrote a launcher that achieves this by placing the process in its own cgroup.<p>May be useful as a &quot;production&quot; example of libcgroup usage.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;geokat&#x2F;cgfy&#x2F;blob&#x2F;master&#x2F;cgfy.c" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;geokat&#x2F;cgfy&#x2F;blob&#x2F;master&#x2F;cgfy.c</a>