by jcelerier · 5y ago · 0 comments
it's not a given
int algo(int*, int n);
int computation(int i, int n) {
int alloc[n];
return algo(alloc, n);
}
on some compilers (Keil for instance afair), alloc will be heap-allocated (and freed when leaving the function) even if it's "automatic storage" (what most people call the stack).Yes, the term "automatic storage" is more accurate here.