Skip to contentSkip to conversation

kernel memory allocation

DISCUSSION J.Hwan Kim 2 participants 2 messages Dec 23, 2011

lore
Share & tools
lore

J.Hwan Kim

author
#0 lore raw

Hi, everyone

How can I allocated contiguous kernel memory over 128MB ? When I use _get_free_pages() function, it returns error.
I guess the memory size is greater than the amount which the function can allocate.

Thanks in advance.

Best Regards,
J.Hwan Kim

#1 lore raw

Hi,

Quoted 6 lines · J.Hwan Kim

Hi, everyone

How can I allocated contiguous kernel memory over 128MB ? When I use _get_free_pages() function, it returns error.
I guess the memory size is greater than the amount which the function can allocate.

You can use bootmem to reserve the memory at boot time, and then use the bootmem allocator to alloocate from that reserved memory/

There is also some new code called CMA (Contiguous Memory Allocator) which hasn't hit the mainline yet, but it could also be used.

See: http://lwn.net/Articles/468044/ for further details.

Signature · 3 lines
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com