[bug #18396] stack size setrlimit call interacts badly with Solaris/x86 kernel bug

2006-11-29 Thread Scott McPeak
Follow-up Comment #3, bug #18396 (project make): Regarding efficiency: First, the main point of my report is not "alloca sucks" but rather that setrlimit is an unexpected thing for make to do. But having opened up the can of worms, let me play with them a little (I don't really want to start a

Re: [bug #18396] stack size setrlimit call interacts badly with Solaris/x86 kernel bug

2006-11-29 Thread Paul Smith
On Wed, 2006-11-29 at 13:22 +, Jon Grant wrote: > > Finally, there is no way to detect an out of stack error and exit gracefully > > with a warning as you suggest: the behavior of alloca() is undefined if you > > run out of stack space (it doesn't just return NULL as malloc() etc. do). > Is i

Re: [bug #18396] stack size setrlimit call interacts badly with Solaris/x86 kernel bug

2006-11-29 Thread Paul Smith
On Wed, 2006-11-29 at 05:49 -0800, Howard Chu wrote: > Some modern mallocs are good, but stack-based allocation is still better > a lot of the time. Especially for temporary variables that are just > going to be discarded after a few computations. Right. And remember it's not just the code man

Re: [bug #18396] stack size setrlimit call interacts badly with Solaris/x86 kernel bug

2006-11-29 Thread Howard Chu
Jon Grant wrote: My view would be that on modern computers switching to allocate from the heap wouldn't make a big difference if it were changed. Modern heaps have pools for small allocations to stop them fragmenting larger allocations anyway. Someone would need to do a compressive test to know f

Re: [bug #18396] stack size setrlimit call interacts badly with Solaris/x86 kernel bug

2006-11-29 Thread Jon Grant
Hi, Paul D. Smith elucidated on 29/11/06 02:27: [...] > Finally, there is no way to detect an out of stack error and exit gracefully > with a warning as you suggest: the behavior of alloca() is undefined if you > run out of stack space (it doesn't just return NULL as malloc() etc. do). Is it unde