kernel memory

Scott Long scottl at
Sat Aug 16 03:51:19 UTC 2008

vehemens wrote:
> I'm going to ask this question as I have not seen this rule written down 
> anywhere.  So don't shoot me please :>
> Do kernel memory memory routines such as malloc always return a region of 
> memory that is locked to a physical page?

Malloc does, yes, as does the UMA zone allocator.  If all you want is an
virtual address range, but no backing pages, use
kmem_alloc_nofault(kernel_map, size).  To later associate it with a
physical page, you can use something like pmap_kenter(va, pa)


More information about the freebsd-current mailing list