kmalloc questions

From: Justin Schoeman (justin@suntiger.ee.up.ac.za)
Date: Tue Oct 03 2000 - 03:25:39 EST


Hi everybody,

A bit of a newbie question. A while ago I was looking through the
available web resources for information on the various malloc()'s for
drivers.

The one I did find (I just can't remember what it was called) stated
that for kmalloc(), the size must be (PAGE_SIZE-x)*2^i, where x is an
overhead required for each page (I think this was 16 bytes, but I can't
remember). Browsing through the 2.2.16 kernel, it seems that the
required overhead is now 0. Is this correct? If I kmalloc(PAGE_SIZE),
will it only use one page of physical memory? Is this memory fixed at
the same physical address, or could it be moved if requests for large
contiguous memory areas come in?

As a side note, what would be the correct way to get the page number of
a kmalloc()ed page? And does anybody perhaps have a pointer to some
more up to date stuff on the mm code?

TIA

-justin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:11 EST