Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why alloca?


How else would you do dynamic arrays without heap allocation if the source language has that as a feature?


With VLAs which are standardized, safer, and scoped.


Good point, that would indeed be a better way to do this.

Full VLA support is optional for C compilers though...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: