cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
c++ memory amount
c++ memory amount
Oct 23, 2014 at 12:47am UTC
srpomol
(2)
Hello guys, I'm very newbie in C++ and I would like to confirm something.
Am I right if I say this as a conclusion?:
The amount of needed memory for global/local variables is assigned during compilation time.
Thanks in advance.
Oct 23, 2014 at 12:53am UTC
Esslercuffi
(305)
well, the amount needed to store any given piece of data can be determined before you even compile. The actual amount that will be allocated may be higher than that, depending on how you set the optimizations for your compiler and linker.
Oct 23, 2014 at 12:59am UTC
mobotus
(275)
http://gribblelab.org/CBootcamp/7_Memory_Stack_vs_Heap.html
Oct 23, 2014 at 12:53pm UTC
srpomol
(2)
thanks for the data.
I thought that I could get a conclusion about the difference between the stack and the heap besides the way they work, but I think is not that simple.
Topic archived. No new replies allowed.