#alloca — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #alloca, aggregated by home.social.
-
So, you want to know how #alloca stacks up, eh? 🤔 Get ready for a snooze-fest with more #buzzwords than a Silicon Valley #startup pitch. 😴 Who knew stacking #memory could be so... bloated? 🙄
https://devblogs.microsoft.com/oldnewthing/20260817-00/?p=112617 #SiliconValley #bloated #techhumor #HackerNews #ngated -
How do functions like alloca allocate memory from the stack?
https://devblogs.microsoft.com/oldnewthing/20260817-00/?p=112617
Comments: https://news.ycombinator.com/item?id=49478525
#HackerNews #alloca #memory #stack #programming #memorymanagement #Cprogramming
-
Учимся рефакторить код на примере багов в TDengine, часть 2: макрос, пожирающий стек
Проверяя код проекта TDengine с помощью PVS-Studio, можно встретить код с запахом, канонические ошибки и опечатки. Многое из этого можно избежать, если изначально аккуратно оформлять код, делать логику простой и избегать макросов. Давайте рассмотрим некоторые фрагменты кода и подумаем, как можно провести его рефакторинг так, чтобы багам просто не было там места.
https://habr.com/ru/companies/pvs-studio/articles/891850/
#c #cpp #си #си++ #pvsstudio #рефакторинг #информационная_безопасность #sast #alloca #сортировка_пузырьком #качество_кода #статический_анализ_кода #обзор_кода
-
My question about #alloca arose because I was reminiscing about having to use the fake alloca on 3B systems. The stack is a linked list on 3B, not a big array.
This wouldn’t present a problem for variable-size arrays: the C compiler could simply insert mallocs and frees as needed.
-
Is there any good reason to use #alloca anymore, given C has now long been able to do the same thing but so it gets reclaimed when leaving scope?
Alloca causes problems with template expansion in #ATS. The problem is you have weak control over where a return from subroutine will occur.
(I have been recently invented a method where you allocate a fixed size array but get a heap object if you need something bigger. It works only if you have a garbage collector, but is safer than stack.)