On Fri, Apr 19, 2024 at 1:42 PM Paul Smith <psm...@gnu.org> wrote: > The main advantages to alloca are twofold: > > 1) efficiency for small local buffers, which GNU Make uses a lot. > > 2) simplification of the code because you don't have to track this > memory and ensure it's freed regardless of how the function returns.
Dennis, do you see an alternative that is at least equally efficient, simple and portable? One alternative that is equally efficient and simple is variable length arrays. However, there is a question about portability of vla vs alloca. regards, Dmitry