allocator
n. 分配算符
2026-05-05 13:31 浏览次数 15
n. 分配算符
Resorce allocator资源分配者
bitmap allocatorbitmap分配器
heat allocator热量分配表
library allocator程序库分配程序
Allocator Utilities分配器工具
register allocator[计]
Channel Allocator信道分配器
slab allocatorslab分配器
debugging allocator写一个调谐分配者
the more dynamic a program is, the more memory management becomes an issue, and the more important your choice of memory allocator becomes.
程序的动态性越强,内存管理就越重要,您的内存分配程序的选择也就更重要。
note that the version of my allocator they describe is not the most current one however.
(注意,他们描述的我的分配器的版本并不是最新的)。
since it operates on the system break (a global variable), it cannot coexist with any other allocator or with mmap.
由于它对系统中断点(一个全局变量)进行操作,所以它不能与其他分配程序或者mmap一起使用。
on unix systems, you can now use your allocator in place of your system malloc() by doing this
在unix系统中,现在您可以用您的分配程序来取代系统的malloc(),做法如下
in c++, you can implement your own allocator on a per-class or per-template basis by overloading operator new().
在 c++ 中,通过重载operatornew(),您可以以每个类或者每个模板为单位实现自己的分配程序。
bsd malloc: bsd malloc, the implementation that was distributed with 4.2 bsd and is included with freebsd, is an allocator that allocates objects from pools of objects of pre-determined sizes.
bsdmalloc:bsdmalloc是随4.2bsd发行的实现,包含在freebsd 之中,这个分配程序可以从预先确实大小的对象构成的池中分配对象。
the pool interface needs to know the size of each individual element and not the type, because it「s a malloc-style allocator and doesn」t call constructors.
pool接口需要知道每个单独的元素而不是类型的大小,因为它是一个malloc风格的分配程序,不会调用构造函数。
however, over the years, the allocator has evolved to make trade-offs that the majority of users find to be acceptable.
尽管如此,这些年来,这个分配器已经进化到做了一些大部分用户都可以接受的取舍。
such a static allocator might lazily create each type of event the first time it is needed and subsequently return the same instance each time, updated with the new information.
在第一次需要它的时候,这样一个静态的分配器可能会创建事件的每个类型,以后每次只返回由新的信息更新过的相同实例。
there remains one kind of caching that is highly desirable in some applications but not implemented in this allocator -- lookasides for very small chunks.
在一些程序中仍然时分需要有一种高速缓沖,但是它并没有在该分配器中被实现--对很小的块进行后备。
in fact, if you do this, you can use the same ld_preload trick that we used for our simple allocator to enable garbage collection in almost any program on your system.
实际上,如果这样做,您就可以使用与我们在示例分配程序中所使用的相同的 ld_preload技巧,在系统上的几乎任何程序中启用垃圾收集。
however, if you aren「t familiar with allocator design, custom allocators can often create more problems than they solve.
不过,如果不熟悉分配程序的设计,那么定制分配程序通常会带来比它们解决的问题更多的问题。
to build your malloc-compatible allocator (actually, we」re missing some functions like realloc(), but malloc() and free() are the main ones), run the following command
运行下面的命令来构建malloc兼容的分配程序(实际上,我们忽略了 realloc() 等一些函数,不过,malloc()和free()才是最主要的函数)
doug lea's allocator has a basic structure much like our version, but it incorporates indexes to make searching faster and has the ability to combine multiple unused chunks into one large chunk.
douglea的分配程序有着与我们的版本非常类似的基本结构,但是它加入了索引,这使得搜索速度更快,并且可以将多个没有被使用的块组合为一个大的块。
an allocator should be plug-compatible with others; in particular it should obey ansi/posix conventions.
一个分配器应该可以和其他程序插件式兼容;特别是它应该遵守ansi/posix惯例。
i wrote the first version of the allocator after writing some c++ programs that almost exclusively relied on allocating dynamic memory.
在写了一些几乎严重依赖于动态分配内存的c++程序之后,我编写了这个分配器的第一个版本。
implementing a simple allocator
实现一个简单的分配程序
if locality were the only goal, an allocator might always allocate each successive chunk as close to the previous one as possible.
如果局部化是唯一的目标,分配器可能总是尽可能接近的分配每个连续的块。
not only does our memory manager have shortcomings, there are many shortcomings of malloc()-based memory management that remain no matter which allocator you use.
不只是我们的内存管理器有缺点,基于malloc()的内存管理器仍然也有很多缺点,不管您使用的是哪个分配程序。
at present, the maximum pool size per process for this allocator is limited to 512mb.
目前,对于这个分配器,每个进程的最大池大小限制为512mb。
vfs inodes are allocated using the slab allocator (from the inode_cache; see resources for a link to more information on the slab allocator).
vfsinode使用slab分配器进行分配(来自 inode_cache; 参考资料 部分提供一个介绍slab分配器的链接)。
previous versions of the allocator used a few search-ordering heuristics that made adequate guesses about caching, although with occasionally bad worst-case results.
以前版本的分配器使用一些搜索-排序尝试对高速缓沖进行足够的猜测,尽管偶然会遇到最坏情况。
it frees every memory block you created earlier and invalidates all the pointers returned from the allocator routines.
该方法释放您先前创建的内存块,并使得从分配程序例程返回的所有指针失效。
allot(Allot)人名;(英)阿洛特;(西)阿略特;(法)阿洛
allow容许;考虑
apportion分配,分派;分摊
assign将财产过户(尤指过户给债权人)
distribute分配;散布;分开;把…分类
lotad (与形容词和副词连用)很,非常;(与动词连用)非常
ration配给;定量供应;限定……的量