collectgarbage count change to lua 5.3

This commit is contained in:
wudeng
2019-04-19 11:57:31 +08:00
committed by 云风
parent 302fc580a5
commit 95cb848772
2 changed files with 3 additions and 3 deletions

View File

@@ -14,8 +14,8 @@ local function init(skynet, export)
dbgcmd = {}
function dbgcmd.MEM()
local kb, bytes = collectgarbage "count"
skynet.ret(skynet.pack(kb,bytes))
local kb = collectgarbage "count"
skynet.ret(skynet.pack(kb))
end
function dbgcmd.GC()

View File

@@ -45,7 +45,7 @@ end
function command.MEM()
local list = {}
for k,v in pairs(services) do
local ok, kb, bytes = pcall(skynet.call,k,"debug","MEM")
local ok, kb = pcall(skynet.call,k,"debug","MEM")
if not ok then
list[skynet.address(k)] = string.format("ERROR (%s)",v)
else