 <p>The fact that you’re using Wine makes no difference in this particular context, which leaves requirements 1 and 2. Requirement 2 –</p> <blockquote> <p>I do not want the process to crash once it exceeds the limit. I want it to use HDD page swap.</p> </blockquote> <p>– is known as limiting the <em>resident set size</em> or <em>rss</em> of the process, and it’s actually rather nontrivial to do on Linux, as is demonstrated by <a href="http://stackoverflow.com/questions/3043709/resident-set-size-rss-limit-has-no-effect">a question asked in 2010</a>. You’ll need to set up <a href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" rel="nofollow">Linux control groups (cgroups)</a>. Fortunately, <a href="http://stackoverflow.com/questions/3043709/resident-set-size-rss-limit-has-no-effect#6365534">Justin L.’s answer</a> gives a brief rundown on how to do so. Note that</p> <ul> <li>instead of <code>jlebar</code>, you should use your own Unix user name, and</li> <li>instead of <code>your/program</code>, you should use <code>wine /path/to/Windows/program.exe</code>.</li> </ul> <p>Using cgroups will also satisfy your other requirements – you can start as many instances of the program as you wish, but only those which you start with <code>cgexec -g memory:limited</code> will be limited.</p>