Tag Archives: Memory Management
Memory Management
Posted by admin
on February 18, 2012
No comments
For many programmers, memory management is an important part of the code. Using memory efficiently is not an easy task, and it can be very confusing. However, there are generally two ways in which memory is given to a program: the stack and the heap.
The stack is the simplest one to understand, and is practically ubiquitous in programming. In certain languages, such as the C-based ones, whenever you allocate a variable, for example "int a;" a block of memory from the program's stack is allocated to hold that data. The stack is based on the computer science concept and is a very simple data structure. Whenever your program starts up, it gets a small block of memory. As functions create variables, they get stored in memory on the stack, generally starting at the top and working downwards. Read more [...]
