add cmemory.info() returns a table of c memory info

This commit is contained in:
Cloud Wu
2015-07-23 16:47:35 +08:00
parent 588c4a3508
commit 39f9a96b6c
4 changed files with 23 additions and 1 deletions

View File

@@ -2,7 +2,11 @@ local skynet = require "skynet"
local memory = require "memory"
memory.dumpinfo()
memory.dump()
--memory.dump()
local info = memory.info()
for k,v in pairs(info) do
print(string.format(":%08x %gK",k,v/1024))
end
print("Total memory:", memory.total())
print("Total block:", memory.block())