Lines Matching defs:Vmalloc
46 /// `Vmalloc` allocates pages from the page level allocator and maps them into the contiguous kernel
51 pub struct Vmalloc;
55 /// `KVmalloc` attempts to allocate memory with `Kmalloc` first, but falls back to `Vmalloc` upon
171 impl Vmalloc {
172 /// Convert a pointer to a [`Vmalloc`] allocation to a [`page::BorrowedPage`].
182 /// use kernel::alloc::allocator::Vmalloc;
191 /// // `ptr` is a valid pointer to a `Vmalloc` allocation.
193 /// let page = unsafe { Vmalloc::to_page(ptr.cast()) };
203 /// - `ptr` must be a valid pointer to a [`Vmalloc`] allocation.
206 // SAFETY: `ptr` is a valid pointer to `Vmalloc` memory.
210 // to `Vmalloc` memory.
215 // this function `ptr` is a valid pointer to a `Vmalloc` allocation.
226 unsafe impl Allocator for Vmalloc {
309 let ta = TestAlign::<Blob, Vmalloc>::new()?;
312 let ta = TestAlign::<LargeAlignBlob, Vmalloc>::new()?;