public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [LKML]kmalloc -contiguous locations ?
@ 2004-05-31  9:49 Shobhit Mathur
  2004-05-31 23:24 ` tabris
  0 siblings, 1 reply; 2+ messages in thread
From: Shobhit Mathur @ 2004-05-31  9:49 UTC (permalink / raw)
  To: linux-kernel

Hello,

I would like to know whether kmalloc() guarantees
virtually contiguous memory locations ? 
Is there a limit on the amount of contiguous memory
that can be returned by kmalloc() ?

- Thank you

- Shobhit Mathur


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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

* Re: [LKML]kmalloc -contiguous locations ?
  2004-05-31  9:49 [LKML]kmalloc -contiguous locations ? Shobhit Mathur
@ 2004-05-31 23:24 ` tabris
  0 siblings, 0 replies; 2+ messages in thread
From: tabris @ 2004-05-31 23:24 UTC (permalink / raw)
  To: Shobhit Mathur; +Cc: linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 31 May 2004 5:49 am, Shobhit Mathur wrote:
> Hello,
>
> I would like to know whether kmalloc() guarantees
> virtually contiguous memory locations ?
> Is there a limit on the amount of contiguous memory
> that can be returned by kmalloc() ?
	First, kmalloc returns physically contiguous memory.
	second, the limit (on x86) is 128kb (32 pages), allocatable in powers of two 
pages. (1,2,4,8,16,32. often called 0-order thru 5-order allocations)

	vmalloc returns virtual contiguous allocations, with no guarantee on physical 
contiguity. The problem with vmalloc, iirc, is that there's a [total] limit 
of 128MB for vmallocs.

	Also remember that all kernel memory allocated with vmalloc() or kmalloc() is 
non-swappable.

	I don't know how this changes under any other architecture, such as x86-64 or 
PPC32/64.
>
> - Thank you
>
> - Shobhit Mathur

- --
tabris
- -
	A master was explaining the nature of Tao to one of his novices.
"The Tao is embodied in all software -- regardless of how insignificant,"
said the master.
	"Is Tao in a hand-held calculator?" asked the novice.
	"It is," came the reply.
	"Is the Tao in a video game?" continued the novice.
	"It is even in a video game," said the master.
	"And is the Tao in the DOS for a personal computer?"
	The master coughed and shifted his position slightly.  "The lesson
is over for today," he said.
		-- Geoffrey James, "The Tao of Programming"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAu76V1U5ZaPMbKQcRAh8MAJ4nXgcFr/AENZql4BDFIRL+HGGJzACeNqej
TPVXSEF6E0ud+MfA8g5tQqE=
=sgpU
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2004-05-31 23:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-31  9:49 [LKML]kmalloc -contiguous locations ? Shobhit Mathur
2004-05-31 23:24 ` tabris

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