Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
CyberDildonics
3 months ago
|
parent
|
context
|
favorite
| on:
Show HN: I built a web framework in C
alloca is just a couple of instructions to allocate more memory on the stack, it is much faster than malloc for pretty much every reason including locality and the fact that it doesn't have to be freed because it goes away after the current scope.
1718627440
89 days ago
[–]
Is there a difference between:
T * ptr = alloca (size);
and
char buffer[size]; T * ptr = &buffer;
under the assumption that this happens at the top-level of a function?
CyberDildonics
89 days ago
|
parent
[–]
Not that I know of
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: