fn take_memfd_slot(
        &self,
        instance_index: usize,
        memory_index: DefinedMemoryIndex,
    ) -> MemFdSlot {
        let idx = instance_index * self.max_memories + (memory_index.as_u32() as usize);
        let maybe_slot = self.memfd_slots[idx].lock().unwrap().take();

        maybe_slot.unwrap_or_else(|| {
            MemFdSlot::create(
                self.get_base(instance_index, memory_index) as *mut c_void,
                0,
                self.memory_size,
            )
        })
    }
/// Take ownership of the given memfd slot. Must be returned via
/// `return_memfd_slot` when the instance is done using it.
Take ownership of the given memfd slot. Must be returned via
`return_memfd_slot` when the instance is done using it.
Take ownership of the given memfd slot . Must be returned via ` return_memfd_slot ` when the instance is done using it .
fn take_memfd_slot(
        &self,
        instance_index: usize,
        memory_index: DefinedMemoryIndex,
    ) -> MemFdSlot {
        let idx = instance_index * self.max_memories + (memory_index.as_u32() as usize);
        let maybe_slot = self.memfd_slots[idx].lock().unwrap().take();
        maybe_slot.unwrap_or_else(|| {
            MemFdSlot::create(
                self.get_base(instance_index, memory_index) as *mut c_void,
                0,
                self.memory_size,
            )
        })
    }
fn take_memfd_slot ( & self , instance_index : usize , memory_index : DefinedMemoryIndex , ) -> MemFdSlot { let idx = instance_index * self . max_memories + ( memory_index . as_u32 ( ) as usize ) ; let maybe_slot = self . memfd_slots [ idx ] . lock ( ) . unwrap ( ) . take ( ) ; maybe_slot . unwrap_or_else ( | | { MemFdSlot :: create ( self . get_base ( instance_index , memory_index ) as * mut c_void , 0 , self . memory_size , ) } ) }
Take ownership of the given memfd slot.
Take ownership of the given memfd slot .
&self
instance_index
usize
memory_index
DefinedMemoryIndex
&self
instance_index
usize
memory_index
DefinedMemoryIndex