]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Introduce the function kmem_alloc_attr(), which allocates kernel virtual
authoralc <alc@FreeBSD.org>
Fri, 9 Apr 2010 02:39:20 +0000 (02:39 +0000)
committeralc <alc@FreeBSD.org>
Fri, 9 Apr 2010 02:39:20 +0000 (02:39 +0000)
commit2366ade4c547cfb6fc2a2854f402e42854d1a125
tree3f1ea036793e3cdb4bc3e3d940fefff6cd519b76
parent2ae521fa83381fb37d51c9fbaa4bf010e9118a70
Introduce the function kmem_alloc_attr(), which allocates kernel virtual
memory with the specified physical attributes.  In particular, like
kmem_alloc_contig(), the caller can specify the physical address range
from which the physical pages are allocated and the memory attributes
(i.e., cache behavior) for these physical pages.  However, in contrast to
kmem_alloc_contig() or contigmalloc(), the physical pages that are
allocated by kmem_alloc_attr() are not necessarily physically contiguous.
This function is needed by DRM and VirtualBox.

Correct an error in the prototype for kmem_malloc().  The third argument
had the wrong type.

Tested by: rnoland
MFC after: 3 days
sys/vm/vm_contig.c
sys/vm/vm_extern.h