Page 1 of 1
Great Article on Stack vs. Heap in the CLR
Posted: Tue Oct 08, 2013 8:23 am
by dandymcgee
Re: Great Article on Stack vs. Heap in the CLR
Posted: Tue Oct 08, 2013 4:57 pm
by Falco Girgis
I think the heap vs stack portion of this article is a huge "no shit" for a developer of a natively compiled language... Whether you're using a garbage collector or not, heap management and fragmentation still exists (only you have to care about it even more), and the stack operates in exactly the same manner. An allocation is literally a pointer addition. A deallocation is a pointer subtraction.
He didn't mention that the stack is also more conducive towards caching either... All the variables of a function are spatially local on the stack, and parent functions' stack frames and their closest childrens' stack frames are temporally local.
Re: Great Article on Stack vs. Heap in the CLR
Posted: Tue Oct 08, 2013 7:13 pm
by dandymcgee
Falco Girgis wrote:I think the heap vs stack portion of this article is a huge "no shit" for a developer of a natively compiled language...
For a very strict definition of "developer", sure. But there are
a lot of people calling themselves developers these days who couldn't even describe a stack data structure, let alone differentiate between the two types of memory allocation.
I posted this as a helpful introduction for someone who has not studied data structures proper but has heard the terms "stack" and "heap" thrown about colloquially without explanation. I also found the tidbit about the stack being an implementation detail in the CLR informative.
Re: Great Article on Stack vs. Heap in the CLR
Posted: Tue Oct 08, 2013 7:27 pm
by Falco Girgis
dandymcgee wrote:Falco Girgis wrote:I think the heap vs stack portion of this article is a huge "no shit" for a developer of a natively compiled language...
For a very strict definition of "developer", sure. But there are
a lot of people calling themselves developers these days who couldn't even describe a stack data structure, let alone differentiate between the two types of memory allocation.
Just because you call yourself something clearly does not make it so...
If you don't know the difference between the stack and the heap, you aren't a developer. Sorry.
Re: Great Article on Stack vs. Heap in the CLR
Posted: Wed Oct 09, 2013 2:34 pm
by dandymcgee
Falco Girgis wrote:Just because you call yourself something clearly does not make it so...
If you don't know the difference between the stack and the heap, you aren't a developer. Sorry.
+1
Re: Great Article on Stack vs. Heap in the CLR
Posted: Fri Oct 11, 2013 6:41 am
by bbguimaraes
Falco Girgis wrote:If you don't know the difference between the stack and the heap, you aren't a developer. Sorry.
Wait... what have I been working with all these years, then?