Top "Stack-memory" questions

Questions regarding process stack memory.

C Array Instantiation - Stack or Heap Allocation?

I guarantee that this question has been asked before, but I haven't been able to find it via search; sorry …

c memory-management heap-memory stack-memory
How to create a struct on the stack in C?

I understand how to create a struct on the heap using malloc. Was looking for some documentation regarding creating a …

c heap-memory stack-memory
Are global variables in C++ stored on the stack, heap or neither of them?

I have an exam on tuesday and I've noticed that, this question is one that my teacher asks a lot …

c++ global-variables heap-memory stack-memory
Class members and explicit stack/heap allocation

Let's say we have 4 classes as follows: class A { public: A(void) : m_B() { } private: B m_B; } class B { …

c++ memory memory-management heap-memory stack-memory
C# - Garbage Collection

Ok so I understand about the stack and the heap (values live on the Stack, references on the Heap). When …

c# heap-memory stack-memory
Variable size arrays in Fortran without Allocate()

Is there a way to create variable size arrays in Fortran on the stack? Allocate() does not work for me, …

arrays memory fortran heap-memory stack-memory
Fields of class, are they stored in the stack or heap?

I saw a question yesterday which raised (for me) another question. Please look at the following code: public class Class1 { …

c# memory-management heap-memory stack-memory
Why would you ever want to allocate memory on the heap rather than the stack?

Possible Duplicate: When is it best to use a Stack instead of a Heap and vice versa? I've read a …

c memory memory-management heap-memory stack-memory
Move value from local stack to heap? (C++)

How can I take an object-as-value result from a method call and place it on the heap? For instance: The …

c++ heap-memory stack-memory
Where in memory are string literals ? stack / heap?

Possible Duplicate: C String literals: Where do they go? As far as I know, generally, pointer have to be allocated …

c pointers char heap-memory stack-memory