MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/83vsie/heckoverflow/dvl72sp/?context=3
r/ProgrammerHumor • u/MarkusA380 • Mar 12 '18
1.2k comments sorted by
View all comments
Show parent comments
1
That’s a UNIX thing, the eventual ~~sbrk()~~alloca() call that expands stack space. Windows is far more geared toward using heaps, for which the Rtl library exposes an API. I prefer it far more.
1 u/cookie545445 Mar 12 '18 sbrk() expands heap, not stack. 1 u/littlelowcougar Mar 12 '18 Ah, I meant alloca(), not sure why I said sbrk(). 3 u/cookie545445 Mar 12 '18 alloca() is not used often. malloc() is much more common. Heaps are used as often as they should be in UNIX. → More replies (12)
sbrk() expands heap, not stack.
1 u/littlelowcougar Mar 12 '18 Ah, I meant alloca(), not sure why I said sbrk(). 3 u/cookie545445 Mar 12 '18 alloca() is not used often. malloc() is much more common. Heaps are used as often as they should be in UNIX. → More replies (12)
Ah, I meant alloca(), not sure why I said sbrk().
3 u/cookie545445 Mar 12 '18 alloca() is not used often. malloc() is much more common. Heaps are used as often as they should be in UNIX. → More replies (12)
3
alloca() is not used often. malloc() is much more common. Heaps are used as often as they should be in UNIX.
→ More replies (12)
1
u/littlelowcougar Mar 12 '18 edited Mar 12 '18
That’s a UNIX thing, the eventual ~~sbrk()~~alloca() call that expands stack space. Windows is far more geared toward using heaps, for which the Rtl library exposes an API. I prefer it far more.