Handle scopes can only be stack-allocated, not allocated with new.
句柄范围只能是在栈上分配的,不能通过new来分配。
Such objects can be safely allocated on the stack instead of the heap.
这样的对象可以安全地在堆栈上而不是在堆上分配。
An IllegalAssignmentError can be introduced when it isn't known which memory area an object is allocated from, or where on the scope stack a particular scope is located.
当不知道从哪个内存区域分配对象或者特定范围位于范围堆栈上的何处时,可能发生IllegalAssignmentError。
Each servlet engine thread is allocated its own stack, which takes up memory within the JVM.
每个servlet引擎线程被分配给它自己的堆栈,该堆栈将消耗J VM中的内存。
As you know value types are allocated on the stack unlike reference types which are allocated on the GC heap.
就像你知道的那样,值类型是分配在栈上的,而引用类型是分配在GC堆上的。
Returning to our very simple example, described in Getting Started, in the following diagram you can see the handle-stack and heap-allocated objects.
回到我们在入门中非常简单的例子上,在下面的的图表中,你可以看到基于栈和基于堆的对象。
Those objects can be allocated directly on the stack (which is faster) and do not enter the heap or require inspection or removal by the normal garbage collector (which reduces GC).
这样,我们就可以直接在栈上为这些对象开辟内存空间(这么做更快),无需使用堆,也不必使用常规的GC手段进行对象检测与移除了(这么做会降低GC的次数,进而提升效率)。
Stack is automatically allocated and released by C++ complier. It has more efficiency using specific push/pop instructions.
栈由编译器自动分配释放,有专门的入栈出栈指令,具有较高的效率。
In either case, the string literals will not be allocated on the stack.
在任一情况下,该字符串将不会在堆栈上分配。
If we are assigning one value variable to the other variable, it creates two distinct copies of the same data on the stack. So now in the stack there are two Spaces allocated.
如果我们将一个变量赋值给另外一个变量,在堆栈中则会创建两个不同的复本,尽管它们的数据是一样的,因此,在堆栈中分配了两块空间。
The values pointed to by var are allocated on the stack.
所指向的值,变量是在堆栈上分配。
They are allocated on the stack or inline and are deallocated when they go out of scope.
结构是在堆栈上或以内联方式分配的,当结构超出范围时将被释放。
But blocks are a special kind of object that is normally allocated on the stack.
但块是一种特殊的对象,通常是在堆栈上分配。
When your program breaks at the specified memory allocation, you can look at the Call Stack window and other debugger information to determine the conditions under which the memory was allocated.
当程序在指定的内存分配处中断时,可以查看“调用堆栈”窗口和其他调试器信息以确定分配内存时的情况。
All the stack frames are allocated in a region of memory called the call stack.
所有栈帧被分配在称为调用栈的内存区域。
Reentrancy is easy-most variables are local variables on the stack and are allocated exclusively for each thread executing a function.
重入是容易的—大多数变量是栈上的本地变量且是线程专有地分配来执行函数。
About 256k is allocated at once even if thread is idle - they are used by default thread stack, net buffer etc.
大概需要立刻分配256k,甚至在线程空闲时—它们使用默认的线程堆栈,网络缓存等。
About 256k is allocated at once even if thread is idle - they are used by default thread stack, net buffer etc.
大概需要立刻分配256k,甚至在线程空闲时—它们使用默认的线程堆栈,网络缓存等。
应用推荐