 <p>No, you can't do this. Everything you can do is add argument to command line to manage the heap size. </p> <p>A dirty solution can be to spawn another process with different heap size, but I don't think this is what you are looking for. <strong><a href="http://www.dreamincode.net/forums/topic/96263-how-to-set-heap-size/" rel="nofollow">Here</a></strong> there is an example.</p>