Conversely, if your program has a fault (for example, using a bad pointer) at some location in memory, you can look for the source line that is closest to the memory address.
相反,如果您的程序在内存中某个位置存在错误(例如,使用了一个错误指针),那么可以查找最接近该内存地址的源代码行。
Where exactly does namestr get written with another address value, and thereby lose the last pointer to memory allocated in main(), causing the leak?
在什么地方 namestr 与其它地址数值一起被编写,从而丢失分配在 main() 中的最后一个内存指针,最终导致渗漏吗?
The earlier example was watching the memory that held the namestr pointer itself; therefore, the address of the watched area is given by &namestr.
先前的例子是关注支持 namestr 指针本身的内存;因此这个被关注区域是由 &namestr 提供的。
Well, it turns out on most computers an address of the location and memory, aka a pointer, is itself 32 bits.
好的,它是一个计算机内存地址,或者说一个指针,占32位。
应用推荐