What is heap and stack?
来源:互联网 发布:国外听音乐的软件 编辑:程序博客网 时间:2024/05/16 08:32
http://www.maxi-pedia.com/what+is+heap+and+stack
The stack is the section of memory that is allocated for automatic variables within functions.Data is stored in stack using the Last In First Out (LIFO) method. This means that storage in the memory is allocated and deallocated at only one end of the memory called the top of the stack. Stack is a section of memory and its associated registers that is used for temporary storage of information in which the most recently stored item is the first to be retrieved.
On the other hand, heap is an area of memory used for dynamic memory allocation. Blocks of memory are allocated and freed in this case in an arbitrary order. The pattern of allocation and size of blocks is not known until run time. Heap is usually being used by a program for many different purposes.
The heap is reserved for the memory allocation needs of the program. It is an area apart from the program code and the stack. the C++ built-in operators new and delete to allocate and deallocate objects in heap memory. the total size of objects allocated on the heap is limited only by your system's available virtual memory.
The stack is much faster than the heap but also smaller and more expensive.
- What is heap and stack?
- What is heap and stack?
- CareerCup What is the difference between a computers heap and it's stack?
- What and where are the stack and heap?
- What and where are the stack and heap?
- What and where are the stack and heap?
- What and where are the stack and heap?
- Base Point@What's the heap and stack?
- What's the difference between stack and heap?
- What's the difference between Heap and Stack
- What’s the difference between a stack and a heap?
- How memory is managed by stack and heap
- Stack and Heap
- Stack and Heap
- Heap and Stack
- String stack and heap
- heap and stack 精华贴
- Heap and Stack
- Comparison--开发WebService两种开源工具CXF和Axis2的比较
- php生成扭曲及旋转的验证码图片
- 测试一下
- Stock Markets Chaos_a002
- 关于JAVA继承类的静态变量、成员变量、父子类构造方法调用顺序的探讨
- What is heap and stack?
- TimesTen 连接属性
- url所传参数的加密
- Oracle动态性能视图学习之 V$ROLLSTAT
- 看代码方法及优秀代码推荐
- 精辟见解
- Thailand's Supreme Court strips a former prime minister of a big slice of his vast wealth
- poj 1423
- 想成为嵌入式程序员应知道的0x10个基本问题