The Linux slab allocator uses these ideas and others to build a memory allocator that is efficient in both space and time.
Linuxslab分配器使用了这种思想和其他一些思想来构建一个在空间和时间上都具有高效性的内存分配器。
The more dynamic a program is, the more memory management becomes an issue, and the more important your choice of memory allocator becomes.
程序的动态性越强,内存管理就越重要,您的内存分配程序的选择也就更重要。
Each new operation had to be balanced by a corresponding delete, or else your program would leak memory, and eventually the memory allocator would fail and your program would crash.
每一个new操作必须有相应的delete操作,否则您的程序就会泄漏内存,最终内存分配器(memory allocator)就会出故障,而您的程序就会崩溃。
As you can see, in this allocator, freeing memory is done in constant time, using a very simple mechanism.
如您所见,在这个分配程序中,内存的释放使用了一个非常简单的机制,在固定时间内完成内存释放。
It does not seem possible for a general-purpose allocator to also serve as general-purpose memory error testing tool such as Purify.
把一个一般用途分配器也当作一般用途内存错误检测工具(像是Purify)使用看上去是不可能的。
A good memory allocator needs to balance a number of goals.
一个好内存分配器需要均衡多个目标。
Entries for the dentry cache are allocated from the dentry_cache slab allocator and use a least-recently-used (LRU) algorithm to prune entries when memory pressure exists.
dentry缓存的条目从dentry_cacheslab分配器分配,并且在缓存存在压力时使用最近不使用(least - recently - used,LRU)算法删除条目。
The memory allocator must give you a 16-byte aligned block of space, because, in general, memory allocation must provide suitable alignment so that the memory can be used for any purpose.
内存分配器必须给你一个16字节对齐块的空间,因为,在一般情况下,内存分配必须提供适当的对齐,内存可用于任何目的。
A different memory allocator is also being used.
还使用了不同的内存分配器。
A different memory allocator is also being used.
还使用了不同的内存分配器。
应用推荐