Re: way to allocate memory within a range ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK thanks for your comments, I found that mempool() API can do the job
I need, because
I can live with a fixed size for allocated object, so I plan to
populate the pool by adding all the
"cells" of the given range.
My use case is another module aside Linux that would map the the same
memory area.

August.

On Wed, Feb 24, 2010 at 4:35 PM, Christoph Lameter
<cl@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, 23 Feb 2010, David Rientjes wrote:
>
>> > Or slab/slub system is not designed for this, I should forget it and
>> > opt for another system?
>> >
>>
>> No slab allocator is going to be designed for that other than SLAB_DMA to
>> allocate from lowmem.  If you don't have need for lowmem, why do you need
>> memory only from a certain range?  I can imagine it would have a usecase
>> for memory hotplug to avoid allocating slab that cannot be reclaimed on
>> certain nodes, but ZONE_MOVABLE seems more appropriate to guarantee such
>> migration properties.
>
> Awhile ago I posted a patch to do just that. It was called
> alloc_pages_range() and the intend was to replace the dma zone.
>
> http://lkml.indiana.edu/hypermail/linux/kernel/0609.2/2096.html
>
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]