(使用带有 ARM 的 MacOS 14。)要在 MacOS 上使用
leaks
处理已编译的 C 可执行文件,我们使用:
leaks -atExit -- <file>
如果没有
-atExit --
,则会抛出 错误。
heap
相当于什么?尝试中:
heap <file>
有类似的错误:
heap[61553]: [fatal] unable to read input graph: The data couldn’t be read because it isn’t in the correct format.
但是
-atExit --
未被识别。
没有“同等”。
使用
leaks
(manpage) 生成内存图表文件,并在该输出上运行 heap
。因此我们使用(<graph>
是选择的名称,<file>
是可执行文件):
leaks -outputGraph=<graph> -atExit -- <file>
随后:
heap <graph>.memgraph