Top "Stack-memory" questions

Questions regarding process stack memory.

How are multi-dimensional arrays formatted in memory?

In C, I know I can dynamically allocate a two-dimensional array on the heap using the following code: int** someNumbers = …

c arrays memory data-structures stack-memory
Creating array of objects on the stack and heap

Consider the following code: class myarray { int i; public: myarray(int a) : i(a){ } } How can you create an array …

c++ arrays object heap-memory stack-memory
How is the array stored in memory?

I have a simple program which initializes an array as: int a[]={10,20,30,40,50}; char *p; p=(char*)a; Now I want …

arrays c pointers heap-memory stack-memory
memory allocation in Stack and Heap

This may seem like a very basic question, but its been in my head so: When we allocate a local …

c memory-management heap-memory dynamic-allocation stack-memory
Is a String literal stored on the stack? Is a new String stored on the stack?

Possible Duplicate: difference between string object and string literal Let's say I have two statements. String one = "abc"; String two = …

java memory-management heap-memory stack-memory
Stack vs heap allocation of structs in Go, and how they relate to garbage collection

I'm new to Go and I'm experiencing a bit of congitive dissonance between C-style stack-based programming where automatic variables live …

go heap-memory stack-memory
how to use gdb to explore the stack/heap?

Could anyone please give me a quick overview/point me to documentation of a way to inspect the stack (and …

c debugging gdb heap-memory stack-memory
Initialization of array on heap

How do i manually initiate values in array on heap? If the array is local variable (in stack), it can …

c++ memory-management heap-memory stack-memory
Stack and heap in c#

Possible Duplicate: What and where are the stack and heap There is a difference in C# between heap and stack. …

c# heap-memory stack-memory
Memory sharing between C++ threads

I'm new to threading in C++, and I'm trying to get a clear picture about how memory is shared/not …

c++ multithreading memory heap-memory stack-memory