我正在尝试查看导致内存泄漏的进程,并转储导致它的堆以查看问题所在。
我在 gdb 中使用哪个命令来设置内存泄漏并检查堆?
我试过:
(gdb) check -leaks
checkpoint: can't find fork function in inferior.
(gdb) help info heap
Undefined info command: "heap". Try "help info".
(gdb) help info leaks
Undefined info command: "leaks". Try "help info".