pub fn used_memory(&self) -> usize {
        unsafe {
            match (*self.extra.get()).mem_info.map(|x| x.as_ref()) {
                Some(mem_info) => mem_info.used_memory as usize,
                None => {
                    // Get data from the Lua GC
                    let used_kbytes = ffi::lua_gc(self.main_state, ffi::LUA_GCCOUNT, 0);
                    let used_kbytes_rem = ffi::lua_gc(self.main_state, ffi::LUA_GCCOUNTB, 0);
                    (used_kbytes as usize) * 1024 + (used_kbytes_rem as usize)
                }
            }
        }
    }
/// Returns the amount of memory (in bytes) currently used inside this Lua state.
Returns the amount of memory (in bytes) currently used inside this Lua state.
Returns the amount of memory ( in bytes ) currently used inside this Lua state .
pub fn used_memory(&self) -> usize {
        unsafe {
            match (*self.extra.get()).mem_info.map(|x| x.as_ref()) {
                Some(mem_info) => mem_info.used_memory as usize,
                None => {
                    // Get data from the Lua GC
                    let used_kbytes = ffi::lua_gc(self.main_state, ffi::LUA_GCCOUNT, 0);
                    let used_kbytes_rem = ffi::lua_gc(self.main_state, ffi::LUA_GCCOUNTB, 0);
                    (used_kbytes as usize) * 1024 + (used_kbytes_rem as usize)
                }
            }
        }
    }
pub fn used_memory ( & self ) -> usize { unsafe { match ( * self . extra . get ( ) ) . mem_info . map ( | x | x . as_ref ( ) ) { Some ( mem_info ) => mem_info . used_memory as usize , None => { // Get data from the Lua GC let used_kbytes = ffi :: lua_gc ( self . main_state , ffi :: LUA_GCCOUNT , 0 ) ; let used_kbytes_rem = ffi :: lua_gc ( self . main_state , ffi :: LUA_GCCOUNTB , 0 ) ; ( used_kbytes as usize ) * 1024 + ( used_kbytes_rem as usize ) } } } }
Returns the amount of memory (in bytes) currently used inside this Lua state.
Returns the amount of memory ( in bytes ) currently used inside this Lua state .
&self
&self