linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* 4MB of physical contiguous memory allocation in Linux
@ 2002-09-05 19:47 vyas niranjan
  2002-09-05 19:54 ` Martin J. Bligh
  0 siblings, 1 reply; 3+ messages in thread
From: vyas niranjan @ 2002-09-05 19:47 UTC (permalink / raw)
  To: linux-mm

HI,

   I am writing a driver whereI am trying to allocate
4MB of Physical contiguous memory. Using
__get_free_pages, I can allocate maximum of 512 pages
in Linux. Is there any way of allocating 4MB of
Physical contiguous memory in Linux??

Thanks and Regards

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 4MB of physical contiguous memory allocation in Linux
  2002-09-05 19:47 4MB of physical contiguous memory allocation in Linux vyas niranjan
@ 2002-09-05 19:54 ` Martin J. Bligh
  2002-09-05 19:59   ` Martin J. Bligh
  0 siblings, 1 reply; 3+ messages in thread
From: Martin J. Bligh @ 2002-09-05 19:54 UTC (permalink / raw)
  To: vyas niranjan, linux-mm

>    I am writing a driver whereI am trying to allocate
> 4MB of Physical contiguous memory. Using
> __get_free_pages, I can allocate maximum of 512 pages
> in Linux. Is there any way of allocating 4MB of
> Physical contiguous memory in Linux??

If MAX_ORDER is 10, which it is by default, I think, you should
be able to get 2^10 = 1024 pages = 4Mb. What happens if you
do an order 10 allocation? Or turn MAX_ORDER up a little, and
see what happens ...

M.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 4MB of physical contiguous memory allocation in Linux
  2002-09-05 19:54 ` Martin J. Bligh
@ 2002-09-05 19:59   ` Martin J. Bligh
  0 siblings, 0 replies; 3+ messages in thread
From: Martin J. Bligh @ 2002-09-05 19:59 UTC (permalink / raw)
  To: vyas niranjan, linux-mm

>>    I am writing a driver whereI am trying to allocate
>> 4MB of Physical contiguous memory. Using
>> __get_free_pages, I can allocate maximum of 512 pages
>> in Linux. Is there any way of allocating 4MB of
>> Physical contiguous memory in Linux??
> 
> If MAX_ORDER is 10, which it is by default, I think, you should
> be able to get 2^10 = 1024 pages = 4Mb. What happens if you
> do an order 10 allocation? Or turn MAX_ORDER up a little, and
> see what happens ...

Hmmm .... looking at a little of the code, seems like MAX_ORDER is
just really badly named, and it's the maximum order + 1. 
Turn it to 11 ... that should fix it.

M.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-09-05 19:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-05 19:47 4MB of physical contiguous memory allocation in Linux vyas niranjan
2002-09-05 19:54 ` Martin J. Bligh
2002-09-05 19:59   ` Martin J. Bligh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox