fn add_dropped_page(&self, page_ptr: PagePtr) {
        let dropped_pages = {
            let mut guard = self.0.lock().unwrap();
            let core = guard.as_mut().unwrap();
            assert_eq!(core.backing_file_owner, BackingFileOwner::CurrentAllocator);
            core.dropped_pages.push(page_ptr);
            if core.dropped_pages.len() > MIN_PAGES_TO_FREE {
                Some(std::mem::take(&mut core.dropped_pages))
            } else {
                None
            }
        };

        if let Some(dropped_pages) = dropped_pages {
            free_pages(dropped_pages);
        }
    }
// Adds the given page to the list of dropped pages that will be freed on the
// next allocation.
// Precondition: the page allocator must be the owner of the backing file.
Adds the given page to the list of dropped pages that will be freed on the
next allocation.
Precondition: the page allocator must be the owner of the backing file.
Adds the given page to the list of dropped pages that will be freed on the next allocation . Precondition : the page allocator must be the owner of the backing file .
fn add_dropped_page(&self, page_ptr: PagePtr) {
        let dropped_pages = {
            let mut guard = self.0.lock().unwrap();
            let core = guard.as_mut().unwrap();
            assert_eq!(core.backing_file_owner, BackingFileOwner::CurrentAllocator);
            core.dropped_pages.push(page_ptr);
            if core.dropped_pages.len() > MIN_PAGES_TO_FREE {
                Some(std::mem::take(&mut core.dropped_pages))
            } else {
                None
            }
        };
        if let Some(dropped_pages) = dropped_pages {
            free_pages(dropped_pages);
        }
    }
fn add_dropped_page ( & self , page_ptr : PagePtr ) { let dropped_pages = { let mut guard = self . 0 . lock ( ) . unwrap ( ) ; let core = guard . as_mut ( ) . unwrap ( ) ; assert_eq ! ( core backing_file_owner BackingFileOwner CurrentAllocator ) ; core . dropped_pages . push ( page_ptr ) ; if core . dropped_pages . len ( ) > MIN_PAGES_TO_FREE { Some ( std :: mem :: take ( & mut core . dropped_pages ) ) } else { None } } ; if let Some ( dropped_pages ) = dropped_pages { free_pages ( dropped_pages ) ; } }
Adds the given page to the list of dropped pages that will be freed on the
next allocation.
Adds the given page to the list of dropped pages that will be freed on the next allocation .
&self
page_ptr
PagePtr
&self
page_ptr
PagePtr