堆支持运行时内存分配,和栈不同,大多数语言都允许程序使用堆管理内存。
The heap provides runtime memory allocation, like the stack, meant for data that must outlive the function doing the allocation, unlike the stack. Most languages provide heap management to programs.
就像你知道的那样,值类型是分配在栈上的,而引用类型是分配在GC堆上的。
As you know value types are allocated on the stack unlike reference types which are allocated on the GC heap.
句柄范围只能是在栈上分配的,不能通过new来分配。
Handle scopes can only be stack-allocated, not allocated with new.
这些栈都是从操作系统分配给Domino的2GB内存中分配的,因此Domino 6可以支持的NRPC用户的数量就限制为3000。
These stacks are allocated from the 2 GB of memory that the operating system gives Domino, thereby limiting the number of NRPC users Domino 6 can support to 3000.
栈由编译器自动分配释放,有专门的入栈出栈指令,具有较高的效率。
Stack is automatically allocated and released by C++ complier. It has more efficiency using specific push/pop instructions.
重入是容易的—大多数变量是栈上的本地变量且是线程专有地分配来执行函数。
Reentrancy is easy-most variables are local variables on the stack and are allocated exclusively for each thread executing a function.
在整个协议栈中,传输层协议负责端到端速率控制,实质上是对资源进行分配。
In the whole protocol stack, transportation layer is responsible for end-to-end rate control, which is essentially resource allocation.
栈空间分配多了会对RAM造成浪费,分配少了又会带来溢出,系统不稳定的问题。
Assign too much space to a stack wastes RAM, assign too little space leads to crashes or, worst scenario, hard to track instability.
栈空间分配多了会对RAM造成浪费,分配少了又会带来溢出,系统不稳定的问题。
Assign too much space to a stack wastes RAM, assign too little space leads to crashes or, worst scenario, hard to track instability.
应用推荐