version 1.10, 1998/08/13 02:10:58 |
version 1.12, 1998/08/28 21:18:37 |
Line 830 pool_page_alloc(sz, flags, mtype) |
|
Line 830 pool_page_alloc(sz, flags, mtype) |
|
int flags; |
int flags; |
int mtype; |
int mtype; |
{ |
{ |
|
boolean_t waitok = (flags & PR_WAITOK) ? TRUE : FALSE; |
|
|
#if defined(UVM) |
#if defined(UVM) |
return ((void *)uvm_km_alloc_poolpage()); |
return ((void *)uvm_km_alloc_poolpage(waitok)); |
#else |
#else |
return ((void *)kmem_alloc_poolpage()); |
return ((void *)kmem_alloc_poolpage(waitok)); |
#endif |
#endif |
} |
} |
|
|
Line 853 pool_page_free(v, sz, mtype) |
|
Line 854 pool_page_free(v, sz, mtype) |
|
} |
} |
|
|
/* |
/* |
|
* Alternate pool page allocator for pools that know they will |
|
* never be accessed in interrupt context. |
|
*/ |
|
void * |
|
pool_page_alloc_nointr(sz, flags, mtype) |
|
unsigned long sz; |
|
int flags; |
|
int mtype; |
|
{ |
|
#if defined(UVM) |
|
boolean_t waitok = (flags & PR_WAITOK) ? TRUE : FALSE; |
|
|
|
/* |
|
* With UVM, we can use the kernel_map. |
|
*/ |
|
return ((void *)uvm_km_alloc_poolpage1(kernel_map, uvm.kernel_object, |
|
waitok)); |
|
#else |
|
/* |
|
* Can't do anything so cool with Mach VM. |
|
*/ |
|
return (pool_page_alloc(sz, flags, mtype)); |
|
#endif |
|
} |
|
|
|
void |
|
pool_page_free_nointr(v, sz, mtype) |
|
void *v; |
|
unsigned long sz; |
|
int mtype; |
|
{ |
|
|
|
#if defined(UVM) |
|
uvm_km_free_poolpage1(kernel_map, (vaddr_t)v); |
|
#else |
|
pool_page_free(v, sz, mtype); |
|
#endif |
|
} |
|
|
|
|
|
/* |
* Release all complete pages that have not been used recently. |
* Release all complete pages that have not been used recently. |
*/ |
*/ |
void |
void |