cmemory.lua 329 B

123456789101112131415
  1. local skynet = require "skynet"
  2. local memory = require "skynet.memory"
  3. memory.dumpinfo()
  4. --memory.dump()
  5. local info = memory.info()
  6. for k,v in pairs(info) do
  7. print(string.format(":%08x %gK",k,v/1024))
  8. end
  9. print("Total memory:", memory.total())
  10. print("Total block:", memory.block())
  11. skynet.start(function() skynet.exit() end)