pub unsafe fn clear(&mut self, 
        #[cfg(feature = "check_double_free")]
        check_double_free: &mut HashSet<u64>
    ) {
        #[cfg(any(feature = "use_pspd", feature = "use_vspd"))] {
            self.spd.clear();
        }
        #[cfg(feature = "pin_journals")]
        {
            let mut page = self.pages.as_option();
            while let Some(p) = page {
                p.clear(
                    #[cfg(feature = "check_double_free")]
                    check_double_free
                );
                page = p.next.as_option();
            }
            self.current = self.pages;
        }

        #[cfg(not(feature = "pin_journals"))] {
            while let Some(page) = self.pages.as_option() {
                let nxt = page.next;
                page.clear(
                    #[cfg(feature = "check_double_free")]
                    check_double_free
                );
                let z = A::pre_dealloc(page.as_mut_ptr() as *mut u8, std::mem::size_of::<Page<A>>());
                A::log64(A::off_unchecked(self.pages.off_ref()), nxt.off(), z);
                A::perform(z);

                #[cfg(feature = "check_allocator_cyclic_links")]
                debug_assert!(A::verify());
            }
        }
        // if let Ok(prev) = A::deref_mut::<Self>(self.prev_off) {
        //     prev.next_off = self.next_off;
        // }
        // if let Ok(next) = A::deref_mut::<Self>(self.next_off) {
        //     next.prev_off = self.prev_off;
        // }
        self.complete();

        #[cfg(not(feature = "pin_journals"))] {
            A::drop_journal(self);
            A::journals(|journals| {
                journals.remove(&std::thread::current().id());
            });
        }
    }
/// Clears all logs and drops itself from the memory pool
Clears all logs and drops itself from the memory pool
Clears all logs and drops itself from the memory pool
pub unsafe fn clear(&mut self, 
        #[cfg(feature = "check_double_free")]
        check_double_free: &mut HashSet<u64>
    ) {
        #[cfg(any(feature = "use_pspd", feature = "use_vspd"))] {
            self.spd.clear();
        }
        #[cfg(feature = "pin_journals")]
        {
            let mut page = self.pages.as_option();
            while let Some(p) = page {
                p.clear(
                    #[cfg(feature = "check_double_free")]
                    check_double_free
                );
                page = p.next.as_option();
            }
            self.current = self.pages;
        }
        #[cfg(not(feature = "pin_journals"))] {
            while let Some(page) = self.pages.as_option() {
                let nxt = page.next;
                page.clear(
                    #[cfg(feature = "check_double_free")]
                    check_double_free
                );
                let z = A::pre_dealloc(page.as_mut_ptr() as *mut u8, std::mem::size_of::<Page<A>>());
                A::log64(A::off_unchecked(self.pages.off_ref()), nxt.off(), z);
                A::perform(z);
                #[cfg(feature = "check_allocator_cyclic_links")]
                debug_assert!(A::verify());
            }
        }
        // if let Ok(prev) = A::deref_mut::<Self>(self.prev_off) {
        //     prev.next_off = self.next_off;
        // }
        // if let Ok(next) = A::deref_mut::<Self>(self.next_off) {
        //     next.prev_off = self.prev_off;
        // }
        self.complete();
        #[cfg(not(feature = "pin_journals"))] {
            A::drop_journal(self);
            A::journals(|journals| {
                journals.remove(&std::thread::current().id());
            });
        }
    }
pub unsafe fn clear ( & mut self , # [ cfg ( feature " " ) ] check_double_free : & mut HashSet < u64 > ) { # [ cfg ( any ( feature " " feature " " ) ) ] { self . spd . clear ( ) ; } # [ cfg ( feature " " ) ] { let mut page = self . pages . as_option ( ) ; while let Some ( p ) = page { p . clear ( # [ cfg ( feature " " ) ] check_double_free ) ; page = p . next . as_option ( ) ; } self . current = self . pages ; } # [ cfg ( not ( feature " " ) ) ] { while let Some ( page ) = self . pages . as_option ( ) { let nxt = page . next ; page . clear ( # [ cfg ( feature " " ) ] check_double_free ) ; let z = A :: pre_dealloc ( page . as_mut_ptr ( ) as * mut u8 , std :: mem :: size_of :: < Page < A > > ( ) ) ; A :: log64 ( A :: off_unchecked ( self . pages . off_ref ( ) ) , nxt . off ( ) , z ) ; A :: perform ( z ) ; # [ cfg ( feature " " ) ] debug_assert ! ( A verify ( ) ) ; } } // if let Ok(prev) = A::deref_mut::<Self>(self.prev_off) { //     prev.next_off = self.next_off; // } // if let Ok(next) = A::deref_mut::<Self>(self.next_off) { //     next.prev_off = self.prev_off; // } self . complete ( ) ; # [ cfg ( not ( feature " " ) ) ] { A :: drop_journal ( self ) ; A :: journals ( | journals | { journals . remove ( & std :: thread :: current ( ) . id ( ) ) ; } ) ; } }
Clears all logs and drops itself from the memory pool
Clears all logs and drops itself from the memory pool
&mut self
check_double_free
&mut HashSet<u64>