LuaMemorySnapshotDump
LuaMemorySnapshotDump copied to clipboard
Lua memory snapshot dump utility, used for memory leak detection。
不好意思,内网无法截图,我只能手写了。以下是我的调用 local mri=require 'common.utils.MemoryReferenceInfo' if Input.GetKeyDown(KeyCode.U) then collectiigarbage("collect") mri.m_cMethods.DumpMemorySnapshot("./","1-Before",10) elseif Input.GetKeyDown(KeyCode.I) then collectiigarbage("collect") mri.m_cMethods.DumpMemorySnapshot("./","2-After,10) elseif Input.GetKeyDown(KeyCode.O) then mri.m_cMethods.DumpMemorySnapshotCompareFile("./","Compared",10,"./LuaMemRefInfo-All-[1-Before].txt","./LuaMemRefInfo-All-[2-After].txt" end 我用的是Slua,对应lua版本5.1,手写输入难免不,但大致是这么写的,我是完全参考你的事例程序这么用的。只要一按U键,立刻屏幕,所有操作都会卡死,也不生成文件(其实到现在我都不知道文件会生成在什么地方)
为查内存泄漏,我在一个使用OpenResty的项目中应用了您的开源组件,不过在对比两个生成的文件时报错,提示如下 (3) [globbing] error: bad range specification after pos 61 有什么方法可以找出原因吗,或者正确的两个文件名写法是什么? [LuaMemRefInfos.zip](https://github.com/yaukeywang/LuaMemorySnapshotDump/files/1809862/LuaMemRefInfos.zip)
Hello, While trying to use your tool, I was getting the following error: MemoryReferenceInfo.lua:261: attempt to concatenate 'string' and 'struct 178 *' and sometimes MemoryReferenceInfo.lua:261: attempt to concatenate 'string' and...
 
类似这种: table: 0x852eaac0 registry.5.[table:key.table] 4 table: 0xfce05b40 registry.5.[table:key.table] 4 table: 0xc10a44a8 registry.5.[table:key.table] 4 table: 0xbe43e9d8 registry.5.[table:key.table] 4 table: 0x012b9dd9c8 registry.5.[table:key.table] 4 table: 0x012bf14b48 registry.5.[table:key.table] 4 table: 0xf5027880 registry.5.[table:key.table] 4 table:...
你好,首先谢谢你的工具。我用该工具获取内存快照后,发现引用对象的前半部分路径并不准确,有时候会指向一个并不存在的变量。但是可以从每个引用对象的后半部分路径推测。lua版本是5.1
 should add tostring to protect k