0

I didn't undrstand when the virable delet from stack ram

18th Jun 2018, 8:47 PM
Omar Muhammad Nofal
Omar Muhammad Nofal - avatar
2 Réponses
0
Stack vs heap Stack is where the program uses to allocate required memory (from the system RAM) to its variables, constants, and other non-dynamic containers. The life time of the program's stack would end by terminating the program becase it belongs to that program. Heap, on the other hand is a free block of memory where the program use it to dynamically allocate storage to dynamic types which their size and state will be determined at runtime. In this case, the programmer is responsible for memory managment*. The common problem in this stage is memory leakage. When the leakage occured, neither program nor OS can do anything about that until the next system restart. ----- * those containers which claim the memory by new keyword.
18th Jun 2018, 9:18 PM
To Seek Glory in Battle is Glorious
To Seek Glory in Battle is Glorious - avatar
0
thank you
18th Jun 2018, 9:26 PM
Omar Muhammad Nofal
Omar Muhammad Nofal - avatar