This code retrieves an instance from the pool, avoiding the memory allocation, construction, and eventual garbage collection.
代码从池中检索到一个实例,从而避免了内存分配、构建和最终的垃圾回收。
When using an object pool, the allocation, initialization, collection, and finalization only occur once, reducing both the memory usage and the processing time that is required.
在使用对象池时,分配、初始化、回收和终结只发生一次,从而减少了内存使用和所需的处理时间。
For most collector implementations, the allocation subsystem keeps a pool of free heap memory, consumed by the application through allocating objects and replenished by the collector through sweeping.
对大多数收集器实现而言,分配子系统持有一个自由堆内存池,应用程序通过分配对象使用该池,然后由收集器通过清理来补充该池。
Pool allocation does not work effectively if one thread of the application allocates memory and other thread frees the memory.
如果应用程序的一个线程分配内存,而其他线程释放内存,那么pool allocation实际上是无效的。
The memory pool for gen0 objects is considerably larger then for the previous scenario to be able to serve allocation needs.
存放第0代对象的内存池也要比非并发GC的大一些,以便满足内存分配的需要。
The Boost pool library introduces tools that you can use for fast memory allocation.
Boostpool库引入了可用于实现快速内存分配的工具。
When a block of memory is returned to the free pool, the bucket index is calculated just like it is done with allocation.
当把内存块返回给空闲池时,像分配时一样计算bucket索引。
Mempool_alloc is for allocating objects; if the mempool allocator fails to provide memory, then the pre-allocation pool will be used.
mempool_alloc用来分配对象;如果内存池分配器无法提供内存,那么就可以用预分配的池。
And some key technologies of the software design were discussed, such as event-driven model, finite state machine model and memory pool allocation.
并给出了软件设计中的一些关键技术,如:事件驱动模型、有限状态机模型和内存池分配技术等。
In memory management technology, we integrated multi-tier memory allocation and type buffer pool to ensure memory allocation more rapidly and easy to use.
在内存管理技术中,提出了多级内存分配结合类型缓存池的方案,使得内存分配能快速而易用。
In memory management technology, we integrated multi-tier memory allocation and type buffer pool to ensure memory allocation more rapidly and easy to use.
在内存管理技术中,提出了多级内存分配结合类型缓存池的方案,使得内存分配能快速而易用。
应用推荐