3 ms·
The first alloca (alloc in a loop) is in a test, which makes it less concerning IME. The second (free() of a stack pointer), oof. Depending on the malloc impl
by syncsynchalt 9y ago
The first alloca (alloc in a loop) is in a test, which makes it less concerning IME.
The second (free() of a stack pointer), oof. Depending on the malloc implementation, you'll get a noop, a crash, an abort, a warning to stderr, or worst of all silent munge of stack vars.
- chris_wot 9y agoYeah, but you also don't want to allocate too many of these and smash the stack.