==9114== HEAP SUMMARY: ==9114== in use at exit: 14,336,980 bytes in 90,048 blocks ==9114== total heap usage: 428,295 allocs, 338,247 frees, 58,358,339 bytes allocated ==9114== ==9114== 0 bytes in 1 blocks are still reachable in loss record 1 of 25,502 ==9114== at 0x4C3289F: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==9114== by 0x66F9EBA: QV4::CompiledData::CompilationUnit::linkToEngine(QV4::ExecutionEngine*) (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Qml.so.5.12.9) ==9114== by 0x6904054: QQmlObjectCreator::init(QQmlContextData*) (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Qml.so.5.12.9) ==9114== by 0x6904202: QQmlObjectCreator::QQmlObjectCreator(QQmlContextData*, QQmlRefPointer<QV4::CompiledData::CompilationUnit> const&, QQmlContextData*, QQmlIncubatorPrivate*) (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Qml.so.5.12.9) ==9114== by 0x688E2E1: QQmlComponentPrivate::beginCreate(QQmlContextData*) (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Qml.so.5.12.9) ==9114== by 0x688BE48: QQmlComponent::create(QQmlContext*) (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Qml.so.5.12.9) ==9114== by 0x4E49D6E: QQuickWidget::continueExecute() (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5QuickWidgets.so.5.12.9) ==9114== by 0x4E4A18A: QQuickWidgetPrivate::execute() (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5QuickWidgets.so.5.12.9) ==9114== by 0x1397D2: TWDZVirtualKeyboard::TWDZVirtualKeyboard() (twdzvirtualkeyboard.cpp:24) ==9114== by 0x13965E: TWDZVirtualKeyboard::GetInstance() (twdzvirtualkeyboard.cpp:8) ==9114== by 0x136629: UartTest::UartTest(int, int, QWidget*) (uarttest.cpp:18) ==9114== by 0x136157: communicationModule::initUi() (communicationmodule.cpp:11)
时间: 2024-02-03 10:02:29 浏览: 119
IBM HeapAnalyzer
5星 · 资源好评率100%
这是 Valgrind 的 HEAP SUMMARY 部分的输出,它显示程序在退出时堆的使用情况。具体来说,它提供了以下信息:
- "in use at exit":退出时在堆上仍然使用的字节数和块数。
- "total heap usage":程序整个运行期间在堆上分配、释放的字节数和块数。
- "0 bytes in 1 blocks are still reachable":这是一个 loss record,表示在程序退出时,有一个块没有被释放,但是指针仍然可以访问到该块。在这个例子中,这个块是由 `operator new[]` 分配的,由 Qt5Qml 库的 `QQmlObjectCreator::init()` 函数链接到引擎中。这并不一定是一个内存泄漏,因为程序结束时操作系统会自动释放所有未释放的内存。但是,如果这些内存块是在一个长时间运行的程序中分配的,可能会导致内存泄漏。
阅读全文