Top "Stack" questions

A stack is a last in, first out (LIFO) abstract data type and data structure.

Linked list vs. dynamic array for implementing a stack

I've started reviewing data structures and algorithms before my final year of school starts to make sure I'm on top …

performance data-structures stack linked-list dynamic-arrays
How is return address specified in stack?

This is what I see by disassemble for the statement function(1,2,3);: movl $0x3,0x8(%esp) movl $0x2,0x4(%esp) movl $0…

assembly x86 stack calling-convention
Tower of Hanoi C++(using recursion)

I wrote the following code as a practice exercise. I'm getting incorrect output when I print the destination stack. Can …

c++ recursion stack towers-of-hanoi
Stack allocation, padding, and alignment

I've been trying to gain a deeper understanding of how compilers generate machine code, and more specifically how GCC deals …

c gcc assembly x86 stack
gcc cc1: out of memory allocating

I am trying to compile a source code in my BeagleBoard with Angstrom Linux. Yesterday I was able to compile …

linux gcc stack ccl
Where are all the static members stored?

I'm trying to learn how C# manages memory. I am stuck on static elements, I read numerous blogs and articles …

c# .net static stack heap
malloc( ): memory corruption (fast) error C++

I'm working in C++. I'm working on a method to change the maximum capacity of a stack and I'm confused …

c++ stack malloc glibc capacity
Fixing my implementation of "inorder tree traversal" algorithm with a Stack

Part of it is that I have to implement a non-recursive method of a inorder traversal of a binary tree. …

java tree stack binary-tree tree-traversal
What Happens When Stack and Heap Collide

I am curious to know what happens when the stack and the heap collide. If anybody has encountered this, please …

c++ c memory stack heap
Escape analysis in Java

As far as I know the JVM uses escape analysis for some performance optimisations like lock coarsening and lock elision. …

java stack allocation escape-analysis