macOS泄漏命令未在memgraph上保存回溯

时间:2019-08-26 23:24:18

标签: xcode macos memory-leaks

任何人都知道为什么leaks不保存堆栈回溯。

我正在运行以下代码:

$ MallocStackLoggingNoCompact=1 leaks 2764 -fullContent --outputGraph=chanita

但是我得到以下输出:

leaks(3032,0x10ff275c0) malloc: stack logs being written into /tmp/stack-logs.3032.109a88000.leaks.wyh5BI.index
leaks(3032,0x10ff275c0) malloc: recording malloc and VM allocation stacks to disk using standard recorder
leaks(3032,0x10ff275c0) malloc: stack logging compaction turned off; size of log files on disk can increase rapidly
leaks(3033,0x10afe65c0) malloc: stack logs being written into /tmp/stack-logs.3033.106548000.leaks.9JZ1V3.index
leaks(3033,0x10afe65c0) malloc: recording malloc and VM allocation stacks to disk using standard recorder
leaks(3033,0x10afe65c0) malloc: stack logging compaction turned off; size of log files on disk can increase rapidly
Invalid connection: com.apple.coresymbolicationd
Output graph successfully written to 'chanita.memgraph' [0.44 MB]
leaks(3033,0x10afe65c0) malloc: stack logs deleted from /tmp/stack-logs.3033.106548000.leaks.9JZ1V3.index
leaks(3032,0x700009052000) malloc: stack logs deleted from /tmp/stack-logs.3032.109a88000.leaks.wyh5BI.index

进程2764是在模拟器上运行的应用程序(如果有区别的话)。

Xcode能够生成堆栈回溯,所以看起来很奇怪。我想使用命令行工具leaks来生成它,而不是Xcode。

1 个答案:

答案 0 :(得分:0)

我自己回答,也许对其他人也有帮助。

问题是我需要使用环境变量MallocStackLoggingNoCompact=1而不是leaks命令运行要检查泄漏的应用程序。

一旦我完成了,内存图将包含回溯。