Linux-kernel mailing list archive 2000-40,: kmalloc questions

# kmalloc questions

Justin Schoeman (justin@suntiger.ee.up.ac.za)
Tue, 03 Oct 2000 10:25:39 +0200

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Jeff Garzik: "Re: kmalloc questions"
- Previous message: Jeff Garzik: "Re: 2.2.18pre13: Small patches"

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/

- Next message: Jeff Garzik: "Re: kmalloc questions"
- Previous message: Jeff Garzik: "Re: 2.2.18pre13: Small patches"