Can i allocate 4GB virtual addresses (more than a certain limit) using vmalloc?
From: j.neuschaefer@gmx.net (Jonathan Neuschäfer)
Date: 2011-08-22 22:27:38
From: j.neuschaefer@gmx.net (Jonathan Neuschäfer)
Date: 2011-08-22 22:27:38
On Mon, Aug 22, 2011 at 04:43:55PM -0500, subin gangadharan wrote:
Hi Dave,quoted
Also keep in mind that when you vmalloc stuff you're allocating in units of pages, and there is a guard page between each allocation. So if you had 512 Mb of virtual space (which is 131,072 pages), you'll be able to vmalloc a maximum of 65536 objects or 1 page each. Fewer objects if they're bigger than a page.A quick question, Suppose if I alloc 1MB of memory using vmalloc,Is there a guard page between each page or is it after the 1MB.
If you do it one vmalloc call your 1MiB should be continuous, i.e. if there's a guard page it will be after your megabyte. HTH, Jonathan Neusch?fer