Here is the separation and please Alimoor never mix this up again.
Heap memory:
-------------
For dynamic allocation of memory.
1. Global variables
2. Static variables
3. Dynamically allocated memory (vector, queue in c++ or malloc, calloc, realloc in c).
Stack memory:
-------------
1. local variables
2. function parameters
3. function return address
3. LIFO order
Useful links:
vector
Stack/Heap : ee.hawaii.edu
Buffer overflow
C++ new
IBM Mac OS X compilers
Vector(C++)
stackoverflow
Learncpp:Nice article
No comments:
Post a Comment