内存泄漏及检测(英文)

LabelImg闪退问题全面排查与高效标注技巧分享 本文详细解析了LabelImg闪退问题的全面排查方法,包括配置文件冲突、中文路径问题及环境依赖检查,并分享了高效标注的实战技巧,如快捷键使用、预设标签智能用法和自动保存策略,帮助用户提升标注效率和质量。 阅读详情

Copyright by 云破日出

 

 

1.     Introduction

1.1       What we are dealing with

Before finding memory leak, we should have an overview of what we are dealing with. Memory leak on Windows platform contains following aspects:

§  Memory leak on CRT, Global, Heap, Virtual, COM, …

§  Handles leak when using GDI, Kernel, Common control, winsock, winhttp, advapi, …

Many memory leak detection tools also detect errors when using memory, which include memory conflict, memory overrun, etc.

 

1.2       Leak detection tools

Figure 1  Leak detection tools

 

1.3       Leak category

Figure 2  Leak category

 

1.4       Work flow

Although we can use different tools to detect memory leak, but there are some common steps to do.

       

Figure 3  Leak detection work flow

 

2.     Tools

2.1       CRT Heap Check Routine

Advantage:

Simple

Speedy

Low cost

Disadvantage:

Can only detect memory leaks allocated by new and malloc

Can only run under Visual Studio IDE

No call stack information, hard to find the leak especially when multi-allocation in same place

Detail:

                Write the following code in the firstly included .h file

                #define _CRTDBG_MAP_ALLOC

                #include <stdlib.h>

                #include <crtdbg.h>

                Write the following code at last to print the result to Debug window

_CrtDumpMemoryLeaks();

Demo:

Figure 4  CRT Heap Check Routing

Notice:

                If _CRTDBG_MAP_ALLOC is not defined before including crtdbg.h, the output imformation will not contain the leak file.

Analyse:

                The output string in Debug window between Dumping objects and Object dump complete has the following meanings (marks are in the window above):

(1)     Leak file and line number

(2)     Memory allocation sequence

(3)     Type of leak block

a.       normal block       allocated by your code

b.       client block                          for MFC destructor

c.       CRT block                            CRT allocated

d.       free block                            freed block (will not appear in the output of the leak dump)

e.       ignore block        programmer can claim blocks ignored by CRT check routine

(4)     The leak address

(5)     ASCII and Binary version of leak content

 

 

2.2       Visual Leak Detector

This is a wrap for CRT heap check routines.

Advantage:

                Same with CRT check routines, but provides call stack information

Disadvantage:

                Same with CRT check routines, but provides call stack information

Detail:

§  Download the zip from CodeProject

§  Copy the VLD library (*.lib) files to your Visual C++ installation's "lib" subdirectory.

§  Copy the VLD header files (vld.h and vldapi.h) to your Visual C++ installation's "include" subdirectory.

§  In the source file containing your program's main entry point, include the vld.h header file. It's best, but not absolutely required, to include this header before any other header files, except for stdafx.h. If the source file, include stdafx.h, then vld.h should be included after it.

§  If you are running Windows 2000 or earlier, then you will need to copy dbghelp.dll to the directory where the executable being debugged resides.

§  Build the debug version of your project.

Demo:

Figure 5  Visual Leak Detector

Notice:

                The library works only when defines _DEBUG, so the release version will not be effected even if including <vld.h>

Analyse:

                The stack trace information and entire leaked data content was print to the output window in VC IDE.

 

2.3       Memory Validator

Memory Validator is a speedy and powerful tool for memory error detecting. It is able to monitor the following kinds of resources :

Figure 6  Memory Validator – Setting Dialog 1

Advantage

                Powerful and handy

Disadvantage

                Sometimes not accurate

Demo

§  Settings

o    Set to monitor one specific resource one time on large scale software. See the collect setting above, and the display setting below.

Figure 7  Memory Validator - Setting Dialog 2

o    Set to monitor only some module of the large scale software

Figure 8  Memory Validator - Setting Dialog 3

§  Watermark

o        Check the leak during the two specific scenarios. We can take a snapshot of memory usage before doing suspicious operation and then take another snapshot when finishing the operation. Check the Compared result data provided by the tool.

Figure 9  Memory Validator – Adding watermark

Figure 10  Memory Validator - All the allocation between two watermarks

§  Objects : Tells us which kind and how many objects existed in memory or leaked after exiting the program. Sort by Number is recommended.

Figure 11  Memory Validator - Objects

§  Filters : Use filters to select the data you are interested in.

Figure 12  Memory Validator - Filters

§  For icons and other view usage, please check the help manual of Memory Validator

 

2.4       BoundsChecker

BoundsChecker is a memory detect tool developed by Compuware. Like memory validator, it uses hook to detect memory leaks. They are almost the same.

Here is some pictures taken from BoundsChecker

Figure 13  Setting Dialog

Figure 14  Boundschecker - Summary Dialog

Figure 15  Leak Detail

 

2.5       UMDH & LeakExplorer

UMDH is a tool provide by Microsoft. Through comparing two memory dump, UMDH tells us how much memory is allocated between the dump. Since not all the memory allocation is leak, so we should do the same operation between the two dump, and get the third dump. If memory increase steadily in the same context, it is quite suspicious. Since there are so much allocations information from kernel, and the output of UMDH is txt file, we have great difficulty in finding leaks. Autocad team developed a tool to analyze the output txt files by UMDH, this is called LeakExplorer.

 

Advantage

                Accurate

                Speedy

                Not using hook, no impact on the program to be tested

Disadvantage

                Not handy, Cost a lot of time to find the leak

Demo

                UMDH.wmv

 


 

 

 

Appendix: Background

1.1       Layered Memory Management in Win32

 

Figure 16  Memory Layer in Windows NT based system

Local, Global memory API are provided by previously released windows api. There used to be a global heap for all the applications, which shares it concurrently, and multiple, private local heaps, one for each application. After win 2000, there is no difference between local heap and global heap. Actually there is no global heap now.

 

1.2       Memory allocation pair

 

 

Allocator

Deallocator

CRT

new

delete

malloc

Free

Virtual Memory

VirtualAlloc

VirtualFree

Heap

HeapAlloc

HeapFree

Global

GlobalAlloc

GlobalFree

Local

LocalAlloc

LocalFree

Com

CoTaskMemAlloc

CoTaskMemFree

SysAllocString*

SysFreeString

SafeArrayCreate

SafeArrayDestroy

Figure 17  Memory allocation pair

Most memory leak happens because of misusing the pair of allocator and free functions. For example, use free() to new(), or use delete() to malloc(), or forget to use free function after allocating memory. But there is an exception, that is Global heap and local heap memory api, as described above.

 

There two kinds of heaps for each application now. One is called default heap, the CRT memory API and Local, Global API allocate memory on it by default. Besides, we can also use HeapCreate to generate a dynamic heap. By using HeapAlloc and HeapFree, we can allocate and free memory on the dynamic heap. The most important difference between these two kinds of heaps is that the default heap is thread-safe. That is to say, we have to do synchronizations for the heap created by HeapCreate.

 

Since we are familiar with the CRT memory management, I will skip that. You can get the leak scenarios for CRT leaks in appendix. Those are tutorials from memory validator, which will be introduced in chapter 2.

 

1.3       Memory management in COM

 

1.3.1          COM pointer

 

All COM components use reference counting technology, they all have AddRef() to increase the count number, and Release() to decrease the count number. If the count number falls to 0, Release() will destroy the COM point and free its memory. So we should use a COM pointer like this.

 
   
 

pCOMNew = pCOM;

pCOM->AddRef();

…

If ( NULL != pCOM)

{

    pCOM->Release();

    pCOM = NULL;

}

If ( NULL != pCOMNEW)

{

    pCOMNEW->Release()

    pCOMNEW = NULL;

}

 

                In most cases we don’t need to write such low level code, for example, we can use macro to replace code of xxx->Release(); xxx = NULL (like SAFEDELETE in directx). Or, we can use a simple smart pointer like this:

 

template <class P>

class CSmartPtr

{

    P* p;

public:

    CSmartPtr(P* ptr) { p = ptr; if(p) p->AddRef(); }

    ~CSmartPtr() { if(p) p->Release(); }

};

 

                And for ATL : CComPtr and CComQIPtr, which are also smart pointer. Just remember when these COM objects goes out of their scope, they will destroy automatically, we needn’t destroy them again. But a lot of memory detection tools report these are memory leaks.

 

1.3.2          BSTR

 

The string operation leaks memory easily, not only because the string often used as a parameter passed everywhere, which would be easily forgotten to free, but also because not understand the library we use.

BSTR is null-terminated, two-bytes string, so its null-termination also has 2 bytes. The name of BSTR means “Basic STRing”, it can be used in Visual Basic and java.lang.string, and any other language support Automation. We usually use CComBSTR in ATL to manipulate the string. I mention it here just because it use SysAllocString and SysFreeString to allocate and free the memory, not malloc and free in CRT. So when there is a memory leak, we can’t expect the CRT memory check routine to find it.

For more information about CComBSTR, you can see Chapter 5, Data Conversion Classes in <Inside ATL>.

 

1.3.3          SafeArray

 

Like BSTR, SafeArray can also be recognized in VB and Java. We use SafeArrayCreate to allocate memory, and use SafeArrayDestroy to free the memory. In ATL, there is an alternative way: CComSafeArray. It’s a template class of SafeArray. They need special attention also because SafeArrayCreate and SafeArrayDestory are not CRT functions. Some memory detection tool will miss the real leaks, and some tools will report a correct scenario as memory leak.

 

1.3.4          CoTaskMemAlloc and CoTaskMemFree

 

As mentioned in 1.3.2, there are two kinds of heaps. The default heap meets our needs in most cases, but for COM, we usually allocate memory in one process, and free memory in another process. Clearly, a conventional heap has no way to handle this, so CoTaskMemAlloc and CoTaskMemFree is used instead. The automatically generated proxy-stub code can properly allocate and free memory across COM boundaries. COM's remoting infrastructure does all the dirty work needed to create the illusion of a single heap that spans processes.

In ATL, there is an interface called IAtlMemMgr, which has the following members:

__interface IAtlMemMgr {                       

public:                                         

    void* Allocate( size_t nBytes ) ;          

    void Free( void* p ) ;                     

    void* Reallocate( void* p, size_t nBytes ) ;

    size_t GetSize( void* p ) ;                

}; 

We can implement it for special usage. ATL also has 5 concrete class implemented IAtlMemMgr, they can be used under different situation, as described in the following table, the left column is classes in ATL, the right column is the low level functions each class used.

 

Memory Manager Class

Heap Functions Used

CComHeap

CoTaskMemAlloc,

CoTaskMemFree,

CoTaskMemRealloc,

IMalloc::GetSize

CCRTHeap

malloc,

free,

realloc

CLocalHeap

LocalAlloc,

LocalFree,

LocalReAlloc,

LocalSize

CGlobalHeap

GlobalAlloc,

GlobalFree,

GlobalReAlloc,

GlobalSize

CWin32Heap

HeapAlloc,

HeapFree,

HeapReAlloc,

HeapSize

 

1.3.5          COM objects’ Reference count

If we found a lot leak within one class, we can infer that one instance of that class wasn’t released, and its destructor wasn’t invoked at all. Usually this can be caused by three scenarios:

§  Object pointer overwriting

§  Forgetting invoke delete operator on the pointer passed by another function

§  Incorrect com object reference count

The first two scenario is easy to detect by using memory check tools, but the third one is hard to locate where has gone wrong. Let’s see why this is difficult. The reference count itself is simple, we only should make sure that AddRef() and Release() matches on a non-smart com pointer, just like new() and delete().

There are 3 kinds of smart pointer in COM, which manipulate reference count automatically.

§  Smart pointer provided by ATL template ( CComPtr and CComQIPtr )

§  Smart pointer provided by compiler ( _com_ptr_t )

§  Smart pointer defined by ourselves

Let’s pick smart pointer from ATL template, other smart pointers are the same. CComPtr and CComQIPtr are subclass of CComPtrBase, its release method is defined like this:

      // Release the interface and set to NULL

      void Release() throw()

      {

            T* pTemp = p;

            if (pTemp)

            {

                  p = NULL;

                  pTemp->Release();

            }

   }

Usually we needn’t call release on a smart pointer, because it can be released automatically. But if we do call release on a class member, let’s see what happens. After calling release, the class member is assigned to be NULL. But actually its reference count may still greater than 0. When the object goes out of scope, the auto-release action will not perform, since the pointer is NULL. Finally the COM object will have no change to release because its reference count is greater than 0.

We also should pay great attention on using non-smart pointer and smart point together. “=” operator is only overloaded for assignments between two smart pointers. When the left side of “=” is just an interface, AddRef() will not be called. We should call AddRef() and Release() manually in this case.

 

1.4       Handle Management

Like memory allocation pairs, handles also has their creator and destroy function pair. We should use them together and make them match.

Appendix: CRT Leak scenario

n  incorrect usage: double delete

    1284 :     char    *ptr;

    1285 :

    1286 :     ptr = new char [10];

    1287 :     delete [] ptr;              // correct cleanup

    1288 :     delete [] ptr;              // incorrect doublecleanup

    1289 : }

 

n  incorrect usage: double free

    1082 :

   1083 :     char    *ptr;

    1084 :

    1085 :     ptr = (char *)malloc(10);

    1086 :     free(ptr);                  // correct cleanup

    1087 :     free(ptr);                  // incorrect doublecleanup

    1088 : }

 

n  free the wrong location

    1107 :     // allocate some memory then free the wrong location, inside the block

    1108 :

    1109 :     ptr = (char *)malloc(3);

    1110 :     for(i = 1; i < 3; i++)

    1111 :         free(ptr + i);          // incorrect cleanup

    1112 :

    1113 :     // correct cleanup

    1114 :

    1115 :     free(ptr);                  // correct

 

n  delete the wrong location

    1314 :     // allocate some memory then free the wrong location, inside the block

    1315 :

    1316 :     ptr = new char [3];

    1317 :     for(i = 1; i < 3; i++)

    1318 :     {

    1319 :         delete (ptr + i);       // incorrect cleanup

    1320 :         delete [] (ptr + i);    // incorrect cleanup

    1321 :     }

 

n  realloc the wrong location

    1367 :     ptr = (char *)malloc(10);

    1368 :     p = (char *)realloc(ptr + 1, 20);       // incorrect realloc

    1369 :     p = (char *)realloc(ptr - 1, 20);       // incorrect realloc

    1370 :     ptr = (char *)realloc(ptr, 20);         // correct realloc

 

n  delete malloc/calloc/relloc’d memory

    4708 :     char    *ptr;

    4709 :

    4710 :     ptr = (char *)malloc(1000);

    4711 :     delete ptr;             // incorrect (it will work with Visual Studio 6.0 debug, but thats relying on a side-effect caused by new wrapping free, if they change the implementation, bang codes the code!)

    4712 :     delete [] ptr;          // incorrect (it will work with Visual Studio 6.0 debug, but thats relying on a side-effect caused by new wrapping free, if they change the implementation, bang codes the code!)

    4713 :     free(ptr);              // correct

 

n  free/relloc new’d memory

    4764 :     char    *ptr;

    4765 :

    4766 :     ptr = new char [1000];

    4767 :     free(ptr);              // incorrect (it will work with Visual Studio 6.0 debug, but thats relying on a side-effect caused by new wrapping free, if they change the implementation, bang codes the code!)

    4768 :     delete [] ptr;          // correct

 

n  HeapReAlloc and HeapFree

 

n  Memory overwritten

    1502 :         char    *p;

    1503 :

    1504 :         p = new char [tmd.sizeToAllocate];

    1505 :         p[tmd.sizeToAllocate] = '/0';

 

n  Memory underwritten

    1479 :         char    *p;

    1480 :

    1481 :         p = new char [tmd.sizeToAllocate];

    1482 :         *(p - 1) = '/0';

 

n  Uninitialized on stack/heap

 

n  Heap memory overrun

 

    1923 :     // warning, the very nature of this overrun may cause this program

    1924 :     // to crash since it damages the CRT heap

    1925 :

    1926 :     char    *memory;

    1927 :

    1928 :     memory = new char[100];

    1929 :     memcpy(memory + 3, memory, 100);

 

n  Heap memory underrun

    1952 :     // warning, the very nature of this overrun may cause this program

    1953 :     // to crash since it damages the CRT heap

    1954 :

    1955 :     char    *memory;

    1956 :

    1957 :     memory = new char[100];

    1958 :     memcpy(memory - 3, memory, 100);

    1959 :

    1960 :     // I'll allow this to leak, since if I try to free it the damaged stack will

    1961 :     // be found, and if I don't try to free it, the program may not crash (for a while)

    1962 : }

 

n  Stack memory overrun

 

n  Stack memory underrun

 

n  Strcpy and wcscpy

    5081 :     char    *charBuffer = new char[20];

    5082 :     wchar_t *wcharBuffer = new wchar_t[20];  

    5085 :     char    *charBufferSource = new char[20];

    5086 :     wchar_t *wcharBufferSource = new wchar_t[20];

    5090 :     charBufferSource[0] = '/0';

    5091 :     wcharBufferSource[0] = _T('/0');

    5092:      strcpy(charBufferSource, "some test text56789");

    5093:      wcscpy(wcharBufferSource, L"some test text56789");

    5112:      // overwrite beginning of buffer

    5113:      strcpy(&charBuffer[-4], charBufferSource);

    5114:      wcscpy(&wcharBuffer[-4], wcharBufferSource);

    5115:      strncpy(&charBuffer[-4], charBufferSource, 20);

    5116:      wcsncpy(&wcharBuffer[-4], wcharBufferSource, 20);

    5117:     

    5118:      // overwrite end of buffer

    5119:      strcpy(&charBuffer[10], charBufferSource);

    5120:      wcscpy(&wcharBuffer[10], wcharBufferSource);

    5121:      strncpy(&charBuffer[10], charBufferSource, 20);

    5122:      wcsncpy(&wcharBuffer[10], wcharBufferSource, 20);

    …

    5146 :     // at this point, deleting the data may cause the program to crash (as the heap has

    5147 :     // been corrupted), if it doesn't the program will most likely crash later on

    5148 :

    5149 :     delete [] charBuffer;

    5150 :     delete [] wcharBuffer;

 

n  Forget deleting the object in an array

    1863 :     for(i = 0; i < 10; i++)

    1864 :     {

    1865 :         char    text[10];

    1866 :

    1867 :         sprintf(text, "%d", i);

    1868 :         array[i] = new CString(text);

    1869 :     }

    1870 :

    1871 :     // cleanup the array, but leak the contents

    1872 :

    1873 :     delete [] array;

 

n  Call functions on a deleted object

简评C++内存泄漏检测工具 C++内存泄漏检测工具简评 阅读详情

相关推荐

Python内存优化工具:python_memory_validator

本文还有配套的精品资源,点击获取 简介:"python_memory_validator" 是一个用于监控和优化Python程序内存使用的工具,它包括实时内存监控、内存泄漏检测、对象分析、内存快照比较、性能报告生成、IDE集成和命令行接口等功能。该工具旨在帮助开发者在处理大数据、长时间运行服务或内存受限环境中,更好地理解和控制内存使用,提升性能和稳定性。 1. 实...

weixin_35756624的博客 1089

[Tool] Memory leak & performance profiling tools for C# / C++

For C++: Memory analysis tools: 1. C++ memory leak detector - Memory Validator (http://www.softwareverify.com/index.html) 2. Other as references: Purify from IBM Performance profiling tool...

weixin_33751566的博客 935

VC++ 6.0英文安装包获取、安装与配置全指南

在软件开发和系统维护领域,遗留项目维护和运行库依赖是常见的技术挑战。当需要维护基于特定历史编译环境构建的应用程序时,环境还原的准确性直接关系到代码的编译成功率和运行时稳定性。Visual C++ 6.0作为上世纪90年代末至21世纪初Windows平台开发的主流工具,其编译器和运行时库(如msvcp60.dll、mfc42.dll)构成了许多遗留系统的技术基础。从技术原理看,这些历史工具链与现代操作系统存在兼容性差异,尤其是在高分辨率显示、系统文件重定向等方面。其技术价值在于为遗留项目维护、历史代码研究和特

weixin_28828243的博客 349

内存泄露&&资源泄漏及解决

new/malloc的,不释放,是内存泄露, COM接口不Release的,是内存泄露。 创建的线程,Socket,GDI对象等,不close是资源泄露。 使用工具: 1)BoundsChecker :(http://www.compuware.com/)(首选B

leer168的专栏 1631

Android内存泄漏信息介绍(英文)

Android内存泄漏说明文件 英文 08-06 13:53:42.082: D/dalvikvm(12152): GC_CONCURRENT freed 1842K, 12% free 15412K/17399K, paused 1ms+3ms

python memory validator

python memory validator

Windows平台上C++开发内存泄漏检查方法

<br />Windows平台上C++开发内存泄漏检查方法 充分的利用调试工具可以非常方便地避免内存泄漏问题。 这里介绍两种方法,互为补充,第一种是VC编译器提供的方法,第二种是专用的内存泄漏检查工具Memmory Validator。这两种方法的基本原理是一样的:内存分配要通过CRT在运行时实现,只要在分配内存和释放内存时分别做好记录,程序结束时对比分配内存和释放内存的记录就可以确定是不是有内存泄漏。其中,第一种方法重载了new操作符,第二种方法是替换了CRT运行时库,在用户程序与运行库之间加了一层,用于

autoopen的专栏 555

用rsl_rl训练四足机器人走梅花桩:PPO算法调参实战与避坑指南

本文详细介绍了如何使用rsl_rl框架和PPO算法训练四足机器人在梅花桩上行走的实战经验。通过分析梅花桩场景的独特挑战,提供PPO算法关键参数配置策略、奖励函数设计方法以及常见问题的解决方案,帮助开发者高效实现机器人平衡控制。文章特别强调了仿真到实机的过渡技巧,最终实现98%的过桩成功率。

weixin_29103191的博客 221

记几个C++程序Memory Leak检查工具

个人用过的最好用的:· BoundsChecker商业软件,可惜似乎已经停止开发了(见http://blogs.msdn.com/matt_pietrek/archive/2007/06/11/r-i-p-numega-lab.aspx,但close lab似乎不一定意味着终止相关产品开发,但肯定会流失一些Experts/Master,而且其母公司现在的定位是一家IT服务公司,哎,多好的产品啊!可

大卫的思维空间 3484

从芯片原厂到BSP工程师:技术转型与核心能力解析

嵌入式系统开发中,BSP(板级支持包)作为连接硬件与操作系统的关键层,其开发能力直接影响设备稳定性与性能。理解Linux内核架构(如内存管理、进程调度)和基础接口协议(I2C/SPI/USB)是BSP工程师的核心技能。在芯片验证与驱动开发场景中,多核异构系统调试与稳定性问题排查(如死机分析)展现了工程师的实战能力。随着物联网与智能设备发展,掌握从硬件适配到系统优化的全链路技术栈,成为职业发展的关键突破点。

weixin_36012152的博客 599

无人机航拍实战:如何用Python代码精准计算目标地理坐标(附完整代码)

本文详细介绍了如何利用Python代码实现无人机航拍图像中目标点的精准地理位置计算。通过解析从像素坐标系到WGS84大地坐标系的完整转换链条,结合相机内参、无人机姿态与地球曲率处理,提供了可直接运行的实战代码,并重点分析了地理位置计算中的常见误差来源与应对策略,助力开发者解决实际项目中的定位漂移问题。

hh234的博客 357

SDL中英文混排与内存泄漏的底层原理与工程实践

SDL_TTF作为C/C++图形开发中常用的字体渲染模块,其核心能力受限于Unicode字形映射机制与无状态内存管理模型。理解UTF-8码点解析、freetype字形加载流程及SDL_Surface像素内存所有权归属,是解决中文乱码与持续内存增长的关键。技术价值在于规避‘渲染即分配’陷阱,建立字体缓存、字符串LRU缓存与显式像素释放三位一体的抗泄漏架构。广泛应用于工控HMI、车载仪表盘、数字标牌等需长期稳定运行的嵌入式GUI场景,尤其适配Noto Sans CJK、文泉驿等开源中文字体与SDL2.0.20+

weixin_29169899的博客 216

C#实现串口通讯程序

1、自动获取本地串口。2、根据传入串口基本属性参数打开串口。3、串口数据的发送接收功能(ASCII和HEX格式)。4、ASCII和HEX相互转换。csharp体验AI代码助手代码解读复制代码[Category("UserProperty")] [Description("轮廓半径")] public int Radius { get => radius;

2401_89221445的博客 1766

Android STT API实战:如何用AI辅助开发提升语音识别效率

基于火山引擎豆包大模型,从零搭建一个实时语音通话应用。它不是简单的问答,而是需要你亲手打通 ASR(语音识别)→ LLM(大脑思考)→ TTS(语音合成)的完整 WebSocket 链路。对于想要掌握 AI 原生应用架构的同学来说,这是个绝佳的练手项目。架构理解:掌握实时语音应用的完整技术链路(ASR→LLM→TTS)技能提升:学会申请、配置与调用火山引擎AI服务定制能力:通过代码修改自定义角色性格与音色,实现“从使用到创造”从0到1构建生产级别应用,脱离Demo,点击打开。

2600_94960158的博客 290

模拟IC设计避坑:手把手教你用Cadence仿真恒定跨导轨到轨运放(附完整工艺库文件)

本文详细解析了使用Cadence仿真恒定跨导轨到轨运放的全流程,涵盖电路原理、工艺库配置、尺寸设计及仿真分析。通过1:3电流镜补偿技术实现跨导稳定,提供CSMC 0.25um工艺下的实战案例,帮助工程师规避设计陷阱,提升模拟IC设计效率。

weixin_30952535的博客 495

税务某局 webpack 登录接口逆向分析

我们再回到接口逻辑去看一下,发现每次请求前,还有两个接口,getpublickey和sendsm4,这里分析了一下调用逻辑,sm4这个接口用到一个参数是由publickey返回的一个参数而来,这个参数又经过内部加密处理,我们找到这个参数加密的地方,大概是在这个位置。我们还是顺着逻辑将加载器扣下来,然后用一个变量去接收,有了加载器,我们直接把加密代码扣下来做下处理,把一些用到的参数整理下如下。打上断点分析后,_utils_getuuid这个很长的变量也是加载器的一个函数,我们将这段代码也扣下来,如下。

码王吴彦祖的博客 402

YOLOv8路面裂缝检测系统实战:从数据标注到中英文界面部署全流程

目标检测是计算机视觉领域最成熟的技术方向之一,它让机器不仅能“看见”图像,还能定位出其中的关键对象。从原理上讲,基于深度学习的检测模型通过卷积神经网络提取特征,在回归边界框与类别的过程中完成端到端的识别,具备速度快、精度高、易部署等优势。这类方案在交通基础设施巡检、工业质检、智慧城市等场景中应用广泛,尤其适合替代人工完成重复性高、标准易漂移的视觉初筛任务。本文以路面裂缝检测为例,系统梳理了从数据集构建、小目标标注规范、模型选型与调优,到Flask服务搭建、中英文双语界面适配、Docker与边缘设备部署的完整

weixin_29050513的博客 153

FAST-LIVO2 源码精读(十六):接入自定义传感器——多雷达适配与内外参标定

本文是「FAST-LIVO2 激光-惯性-视觉里程计源码精读」专栏第十六篇。上一篇拆解了中每个关键参数的物理含义与调参路径,并反复强调外参RclPcl与时间偏移配错即全局失效;本篇承接这一悬念,回答更前置的工程问题——如何把 FAST-LIVO2 接到一套全新硬件上:新雷达如何通过的类型分支适配、相机内参与畸变模型如何配置、两组外参与时间偏移如何标定出来并填入 YAML,最后给出一份落地检查清单。

PX4-SLAM-PNC 199

vc++内存泄漏检测

vc++内存泄漏检测

huangyimin的专栏 1389

Lion优化器试验笔记

Lion优化器试验笔记

jacke121的专栏 847

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

使用 CRT 调试功能来检测内存泄漏

使用 CRT 调试功能来检测内存泄漏首先,检测内存泄漏的基本工具是调试器和 CRT 调试堆函数。为了使用调试堆函数,必须在要检测内存泄漏和调试的程序中添加下面的语句: #define _CRTDBG_MAP_ALLOC #include #include #include "debug_new.h"   MSDN 如是说:“必须保证上面声明的顺序,如果改变了顺序,可能不能正常工作。”至

难得糊涂 1997

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

检测内存泄漏

最近看了周星星 Blog 中的一篇文章:“VC++6.0中内存泄漏检测”,受益匪浅,便运行其例子代码想看看 Output 窗口中的输出结果,可惜怎么弄其输出都不是预期的东西,郁闷了半天,便到水坛里找到周星星,请求他指点一、二,然而未果。没有办法,最后我一头栽进 MSDN 库狂搜了一把,功夫不负有心人,我搜出很多有关这方面的资料,没过多久我便基本上就找到了答案...... 首先,检测内存泄漏的基

痞子龙3D编程 1538

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

Google开源Leak Finder——用于检测内存泄漏的JavaScript工具

本文来源于我在InfoQ中文站翻译的文章,原文地址是:http://www.infoq.com/cn/news/2013/01/JavaScript-Leak-Finder近日,Google开源了Leak Finder,这款工具可以查看JavaScript应用的堆,进而发现内存泄漏。作为一门垃圾收集语言,JavaScript并不会出现常见的内存泄露情况,特别是像C++等语言中所见到的那种。但如果依

张龙(风中叶)的专栏 2657

VC++ 6.0 中如何使用 CRT 调试功能来检测内存泄漏(转)

VC++ 6.0 中如何使用 CRT 调试功能来检测内存泄漏作者:JerryZ下载例子源代码  最近看了周星星 Blog 中的一篇文章:“VC++6.0中内存泄漏检测”,受益匪浅,便运行其例子代码想看看 Output 窗口中的输出结果,可惜怎么弄其输出都不是预期的东西,郁闷了半天,便到水坛里找到周星星,请求他指点一、二,然而未果。没有办法,最后我一头栽进 MSDN 库狂搜了一把,功夫不负有心人

bairny的专栏 1万+

VC++ 6.0 中如何使用 CRT 调试功能来检测内存泄漏 调试方法

VC++ 6.0 中如何使用 CRT 调试功能来检测内存泄漏 作者:JerryZ 下载例子源代码   最近看了周星星 Blog 中的一篇文章:“VC++6.0中内存泄漏检测”,受益匪浅,便运行其例子代码想看看 Output 窗口中的输出结果,可惜怎么弄其输出都不是预期的东西,郁闷了半天,便到水坛里找到周星星,请求他指点一、二,然而未果。没有办法,最后我一头栽进 MSDN 库狂搜了

yxnyxnyxnyxnyxn的专栏 2904
上一篇: 定制命令行窗口
下一篇: Direct3D的一些小贴士
MikeFeng
博客等级 码龄23年 27粉丝 29原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值