On 04/07/2015 10:42 PM, Bjørn Roald wrote:
Rob, it used to be possible to do:
import option ; option.set jobs : 4 ;
in user-config.jam, but that appears to have regressed. Is that what you're after?
This would be a nice config setting.
Okay, I'll see whether I can revive it.
Also, in principle, bjam could check available free RAM before invoking a new parallel task. I think -j 4 does not mean it _has_ to run 4 tasks in parallel, rather it means up to 4 tasks in paralell. An implicit -j
certainly should throttle on system resources, so why not available RAM as well as available cores.
I don't think it's easy. If I run 4 compilations in parallel, and it consumes so much RAM and I/O that computer becomes unresponsive, it means the OS could not throttle these tasks effectively. And if OS, having all information at hand, fails, then b2 has no chance. -- Vladimir Prus CodeSourcery / Mentor Embedded http://vladimirprus.com