Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 1995 00:09:16 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        davidg@Root.COM, terry@cs.weber.edu
Cc:        current@FreeBSD.org, wollman@halloran-eldar.lcs.mit.edu
Subject:   Re: Why does kern_lkm.c use kmem_alloc()?
Message-ID:  <199503211409.AAA17502@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>Virtually, at least initially, so that the loader can load the code
>>contiguously in the address space in which it is to run.

>   Ahh. Yes, kmem_alloc() is the thing to use in this case.

I hope nothing depends on the virtually contiguous memory being physically
contiguous here.  vm_page_alloc_contig() is the thing to use to get
physically contiguous memory.

>>Oh, and it wants to load the code page aligned.  kmem_alloc returns memory
>>statring at the start of a page (or at least it used to and does in

>   Right, it allocates in terms of pages. Garrett should be able to use the
>"size" field of modstat to see how much memory each module consumes (plus
>whatever is malloc'd).

Ordinary malloc() returns page aligned memory for sizes >= one page.

I'd like vmstat to show all kernel *alloc()ed memory.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503211409.AAA17502>