虚拟内存分配器建议? [英] Virtual memory allocator recommendations?

查看:76
本文介绍了虚拟内存分配器建议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一种情况,我需要能够在

未映射的虚拟内存上分配块。


因为我分配的内存不是没有映射,我不能使用普通的

内存分配器,因为大多数人都希望在未使用的漏洞中存储关于

免费列表的元数据堆。相反,我需要一个内存来支持存储其元数据的内存(反过来说,一个

简单的malloc()堆就可以了)。


有没有人知道这样的野兽?


这种东西对于分配任何类似内存很有用

资源,例如文件中的空格,或一天中的时间块,或者某种东西。所以我肯定他们在那里;我找不到任何......


-

a ?? a ?? a ?? a ?? ???????? * ?????????????????????????????????一个??一个??一个??一个??的ΔΣ http://www.cowlark.com a ?? a ?? a ?? a? ?a ??

a ?? ......不是那个精心设计的GUI很少见,只是

a ??三臂用户GUI'的设计很少见。 --- Mike Uhl on

a ?? afc

I have a situation where I need to be able to allocate chunks on
unmapped virtual memory.

Because the memory I''m allocating isn''t mapped, I can''t use a normal
memory allocator, as most of them want to store their metadata about the
free list in the unused holes in the heap. Instead, I need a memory
allocator that stores its metadata out-of-line (perversely enough, a
simple malloc() heap would be fine for that).

Does anyone know of such a beast?

This sort of thing would be useful for allocating any memory-like
resource, such as space in a file, or blocks of time in a day, or that
sort of thing. So I''m sure they''re out there; I just can''t find any...

--
a??a??a??a?? ????????*????????????????????????????????? a??a??a??a??a?? http://www.cowlark.com a??a??a??a??a??
a?? "...it''s not that well-designed GUI''s are rare, it''s just that the
a?? three-armed users GUI''s are designed for are rare." --- Mike Uhl on
a?? a.f.c

推荐答案

David Given写道:
David Given wrote:

我有一个需要的情况能够在
未映射的虚拟内存上分配块。


因为我分配的内存没有映射,所以我不能使用一个正常的内存分配器,因为他们中的大多数都希望将关于

空闲列表的元数据存储在堆中未使用的漏洞中。相反,我需要一个内存来支持存储其元数据的内存(反过来说,一个

简单的malloc()堆就可以了)。


有没有人知道这样的野兽?
I have a situation where I need to be able to allocate chunks on
unmapped virtual memory.

Because the memory I''m allocating isn''t mapped, I can''t use a normal
memory allocator, as most of them want to store their metadata about the
free list in the unused holes in the heap. Instead, I need a memory
allocator that stores its metadata out-of-line (perversely enough, a
simple malloc() heap would be fine for that).

Does anyone know of such a beast?



这对系统特定的API来说并不难,但是我不要认为标准C中有什么价值。所以你最好在平台上询问

特定群体,这种访问水平趋向于特定于平台。


-

Ian Collins。

It''s not hard to do with system specific APIs, but I don''t think there''s
a what in standard C. So you''d be better off asking in a platform
specific group, this level of access tends to be very platform specific.

--
Ian Collins.


Ian Collins写道:
Ian Collins wrote:

David Given写道:
David Given wrote:

>我有一种情况我需要能够分配
未映射的虚拟内存上的块。

因为我分配的内存没有映射,所以我不能使用正常的内存分配器,因为大多数他们想要存储关于
免费lis的元数据在堆中未使用的孔中。相反,我需要一个内存分配器来存储其元数据的外联(反过来说,一个简单的malloc()堆就可以了)。

有谁知道这样的野兽?
>I have a situation where I need to be able to allocate chunks on
unmapped virtual memory.

Because the memory I''m allocating isn''t mapped, I can''t use a normal
memory allocator, as most of them want to store their metadata about the
free list in the unused holes in the heap. Instead, I need a memory
allocator that stores its metadata out-of-line (perversely enough, a
simple malloc() heap would be fine for that).

Does anyone know of such a beast?



使用系统特定的API并不难,但我不认为有这样的>
a标准C中的内容。所以你最好在平台上询问

特定组,这种访问级别往往是非常特定于平台的。

It''s not hard to do with system specific APIs, but I don''t think there''s
a what in standard C. So you''d be better off asking in a platform
specific group, this level of access tends to be very platform specific.



糟糕,使用标准C中的方式。


-

Ian Collins。

Oops, make that "way in standard C".

--
Ian Collins.


Ian Collins< ia ****** @ hotmail.comwrites:
Ian Collins <ia******@hotmail.comwrites:

David Given写道:
David Given wrote:

>我有一种情况需要能够在未映射的虚拟内存上分配块。

因为内存我'分配没有映射,我不能正常使用
m emory allocator,因为他们中的大多数都希望将关于
空闲列表的元数据存储在堆中未使用的漏洞中。相反,我需要一个内存分配器来存储其元数据的外联(反过来说,一个简单的malloc()堆就可以了)。

有谁知道这样的野兽?
>I have a situation where I need to be able to allocate chunks on
unmapped virtual memory.

Because the memory I''m allocating isn''t mapped, I can''t use a normal
memory allocator, as most of them want to store their metadata about the
free list in the unused holes in the heap. Instead, I need a memory
allocator that stores its metadata out-of-line (perversely enough, a
simple malloc() heap would be fine for that).

Does anyone know of such a beast?



使用系统特定的API并不难,但我不认为有这样的>
a标准C中的内容。所以你最好在平台上询问

特定组,这种访问级别往往是非常特定于平台的。

It''s not hard to do with system specific APIs, but I don''t think there''s
a what in standard C. So you''d be better off asking in a platform
specific group, this level of access tends to be very platform specific.



实际上,他正在尝试做的事情听起来并不是特定于系统特定的。正如他在原始文章中写道的那样:


这类事情对于分配任何类似内存的资源(例如文件中的空格)非常有用,或者一天中的时间块,或者说是b / b $ b。所以我肯定他们在那里;我不能

找到任何...


所以他正在寻找的是一种从某个范围分配块的方法

of lt(内存地址,文件偏移量,一天中的时间)没有

存储元数据和分配的块。他可以像分配数字范围一样。


我认为问题更多的是关于算法和数据结构而不是

关于任何特定系统甚至任何特定语言,所以

comp.programming可能是最好的问题。


-

Keith Thompson(The_Other_Keith) ks***@mib.org < http://www.ghoti.net/~ kst>

诺基亚

"我们必须做点什么。这是事情。因此,我们必须这样做。

- Antony Jay和Jonathan Lynn,是部长

Actually, what he''s trying to do doesn''t sound very system specific to
me. As he wrote in the original article:

This sort of thing would be useful for allocating any memory-like
resource, such as space in a file, or blocks of time in a day, or
that sort of thing. So I''m sure they''re out there; I just can''t
find any...

So what he''s looking for is a way to allocate chunks out of some range
of <whatever(memory addresses, file offsets, times of day) without
storing metadata alongside the allocated chunks. He could just as
well be allocating ranges of numbers.

I think the question is more about algorithms and data structures than
about any particular system or even any particular language, so
comp.programming is probably the best place to ask.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"


这篇关于虚拟内存分配器建议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆