我对C ++很新,我实现了一个程序,用于医学成像的ITK库。它具有很高的计算成本,在运行结束时,我的笔记本电脑似乎失去了速度和功能。这是Valgrind的输出:
==6258== HEAP SUMMARY:
==6258== in use at exit: 3,573,521 bytes in 25,493 blocks
==6258== total heap usage: 271,050 allocs, 245,557 frees, 5,231,125,547 bytes allocated
==6258==
==6258== LEAK SUMMARY:
==6258== definitely lost: 283,640 bytes in 11,812 blocks
==6258== indirectly lost: 3,101,916 bytes in 11,816 blocks
==6258== possibly lost: 0 bytes in 0 blocks
==6258== still reachable: 187,965 bytes in 1,865 blocks
==6258== suppressed: 0 bytes in 0 blocks
我知道它并不完美,并且并非所有内存块都被释放,但我想知道这些结果是否可能是悲剧性的,或者它们不会影响PC的性能,这么多。 我的笔记本电脑有一个4Gb的RAM,四核。