title: How are alloca and thread safety related, if at all?
body: <p>Generic theory question.</p>
  
  <p>I'm trying to build a library from source (FFTW if anyone cares, but it really doesn't matter), and I noticed  there is an option to disable the use of <code>alloca</code>.</p>
  
  <p>I'm aware of the dangers of using <code>alloca</code>, but I'm assessing the performance of FFTW with and without <code>alloca</code>.</p>
  
  <p>Does <code>alloca</code> have known issues with thread safety? I'm seeing an extreme performance hit when I use a certain number of threads with FFTW (which is obviously calling <code>alloca</code> in the background). I'm sticking to using a number of threads equal to powers of 2, if that matters.</p>
  
  <p>Is it possible that FFTW is sharing objects on a thread-local stack via <code>alloca</code>? I'm just trying to figure out why I see such extreme performance hits with certain numbers of threads. However, I don't fully understand the theory behind what <code>alloca</code> is really doing w/ threads.</p>