Use alloca to allocate memory that isn't used outside a function.
It is currently done in a few places.
Merge branch 'master' into Xcode6