Visual Leak Detector VS2019

Visual Leak Detector

介绍

(翻译仅供参考)

Visual C++ provides built-in memory leak detection, but its capabilities are minimal at best. This memory leak detector was created as a free alternative to the built-in memory leak detector provided with Visual C++. Here are some of Visual Leak Detector’s features, none of which exist in the built-in detector:

Visual C++提供了内置内存泄漏检测,但其性能很低。这个内存泄漏检测器被创建为用Visual C++提供的内置内存泄漏检测器的免费替代。这里有一些内置检测器中没有的Visual Leak Detector的特点:

  • Provides a complete stack trace for each leaked block, including source file and line number information when available.
  • Detects most, if not all, types of in-process memory leaks including COM-based leaks, and pure Win32 heap-based leaks.
  • Selected modules (DLLs or even the main EXE) can be excluded from leak detection.
  • Provides complete data dumps (in hex and ASCII) of leaked blocks.
  • Customizable memory leak report: can be saved to a file or sent to the debugger and can include a variable level of detail.
  • 为每个泄漏的块提供完整的堆栈跟踪,包括源文件和行号信息(如果可用)。
  • 检测大多数(如果不是全部)进程内内存泄漏类型,包括基于COM的泄漏和纯Win32基于堆的泄漏。
  • 选定的模块(dll甚至主exe)可以从泄漏检测中排除。
  • 提供泄漏块的完整数据转储(十六进制和ASCII格式)。
  • 可自定义的内存泄漏报告:可以保存到文件或发送到调试器,并且可以包含可变详细级别。

Other after-market leak detectors for Visual C++ are already available. But most of the really popular ones, like Purify and BoundsChecker, are very expensive. A few free alternatives exist, but they’re often too intrusive, restrictive, or unreliable. Visual Leak Detector is currently the only freely available memory leak detector for Visual C++ that provides all of the above professional-level features packaged neatly in an easy-to-use library.

Visual C++的其他售后市场泄漏检测器已经可用。但是大多数真正流行的,像Purify和BoundsChecker,都非常昂贵。一些免费的替代品存在,但它们往往过于侵入,限制,或不可靠。Visual Leak Detector是目前(原文可能写于约四年前)唯一可用的Visual C++的内存泄漏检测器,它提供了所有以上的专业级功能,在一个易于使用的库中被打包。

Visual Leak Detector is licensed free of charge as a service to the Windows developer community. If you find it to be useful and would like to just say “Thanks!”, or you think it stinks and would like to say “This thing sucks!”, please feel free to drop us a note. Or, if you’d prefer, you can contribute a small donation. Both are very appreciated.

Visual Leak Detector是免费授权给Windows开发人员社区的服务。如果你觉得它有用,只想说“谢谢!,或者你觉得它很臭,想说“这东西很烂!“,请随时给我们留言。或者,如果你愿意,你可以捐一点钱。两者都非常感谢。

下载安装

在这里插入图片描述
理论上是供Visual C++ 2008-2015使用,实际上似乎VS2019也能用。

使用

#include <iostream>
#include<memory>

#include<vld.h>

int main()
{
    std::cout << "begin\n";
    int* a = new int[10]{ 0,1,2,3,4,5,6,7,8,9 };
    std::cout << a << " " << a + 1 << "\n";
    //std::unique_ptr<int[]> a(new int[10]{ 0,1,2,3,4,5,6,7,8,9 });
    //std::cout << &a[0] << " " << &a[1] << "\n";
    std::cout << "end\n";
    return 0;
}

在这里插入图片描述
在这里插入图片描述

Intel采用小端编址,低位低地址,高位高地址。
参考资料:
大端和小端

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值