Allocating large contigious memory in kernel

Is there a limitation in allocating large contigious memory in the Linux kernel?

VSS

Reply to
VSS
Loading thread data ...

Look at kmalloc.

There are a number of constraints on how much contiguous memory you can allocate. The exact constraint varies by system and by the type of memory you need. It also varies by the amount of fragmentation - as the system runs longer, the maximum contiguous region may be quite small.

If you really need a large contiguous region, I suggest - fixing your design so you don't need it physically contiguous or - using the bigphysarea patch (available for 2.4 and 2.6 kernels) The latter is not likely to get adopted into the mainline kernel but has been maintained by people for a few years now.

--Mark

Reply to
Mark H Johnson

As mark suggested try using the bigphysarea patch or try allocating memory at boot the memory u allocate here has to be managed by you and the OS doesnt see it all. The disadvantage in this approach is your code cannot be a module it has to built in into the kernel

Reply to
Amit Limaye

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.