The RTSJ spec requires a program re-write to use scoped memory.
RTSJ规范要求程序重写以使用有限的内存。
This article introduced the LMMPWT pattern for simplifying scoped memory usage.
本文引入了LMMPWT模式以简化作用域内存的使用。
This article introduces a technique that you can use to simplify scoped memory usage.
本文引入的这种技术可以让您简化作用域内存的使用。
Objects created in scoped memory live for the lifetime of the scope they are created in.
在作用域内存中创建的对象则在于其中创建它们的作用域的生命周期中存在。
Once all objects in the scoped memory are no longer referenced the memory is freed to be used again.
一旦scoped内存中的所有对象都不再被引用了,它就会被释放以备再次使用。
IllegalThreadStateException is thrown when code that enters scoped memory areas is run by regular threads.
当进入范围内存区域的代码由常规线程运行时,将抛出IllegalThreadStateException。
To ensure the integrity of the heap and the immortal memory area, the RTSJ defines rules for using scoped memory.
为确保堆和不朽内存区域的完整性,RTSJ定义了使用作用域内存的规则。
For example, to run 50 production lines at 10-millisecond period, we would need at least 55mb of scoped memory.
例如,要以10毫秒的周期运行50个生产线,我们至少需要55M b作用域内存。
There are two types of scoped memory, linear and variable which refers to the time required to instantiate an object.
Scoped内存有两种,线性的(linear)和可变的(variable)——这是指它们实例化一个对象所需的时间。
Because of these complexities, the recommended use of immortal and scoped memory is limited to components that cannot tolerate GC pauses.
由于这些复杂性,建议只对那些不能够忍受GC暂停的组件使用不朽和作用域内存。
Scoped memory areas have a maximum size that is specified when they are created and must be tuned to the task they are being used for.
作用域存储区的大小有最大值,这是在其创建时指定的,并且必须用于它们的目标任务。
For this technique to be robust, the tasks you perform must be bounded so you can predict and calibrate the amount of scoped memory required.
要使此技术更为健壮,您执行的任务必须是限定的,那样您才能够预测并校准所需的作用域内存数量。
A developer will create a scoped memory area of a specific size and when objects are instantiated the space for them will be allocated from this area.
开发者会创建一个指定大小的Scoped内存域,当实例化一个对象的时候,会从这个域内分配一块空间给它。
Each area of scoped memory has a reference count; when a thread enters an area of scoped memory, the reference count is incremented, and when it leaves, the reference count is decremented.
作用域内存的每个区域都有一个引用计数;一个线程进入scoped内存的一个区域时,该引用计数将递增,当该线程离开时,引用计数则递减。
Before we can apply scoped and immortal memory to our design, we need to understand a little more about how they work.
要为我们的设计应用作用域和不朽内存,首选需要对其工作原理略知一二。
Cache entries can be scoped with the session ID to keep a relationship between the session and the data that is to be kept in memory.
可以使用会话id设置缓存条目的范围,以使会话和要保存在内存中的数据建立关联。
Storing privately scoped pages in a browser cache is optimal with regard to memory utilization in the cache, as well as in its location as close as possible to the end user.
将作用域设置为私有的页面存储在浏览器缓存中能达到对缓存的最佳内存利用,同时其位置也尽可能地接近最终用户。
Storing privately scoped pages in a browser cache is optimal with regard to memory utilization in the cache, as well as in its location as close as possible to the end user.
将作用域设置为私有的页面存储在浏览器缓存中能达到对缓存的最佳内存利用,同时其位置也尽可能地接近最终用户。
应用推荐