Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
COM provides the IMallocSpy interface for developers to use to debug their memory allocations. For each method in IMalloc, there are two methods in IMallocSpy, a "pre" method and a "post" method. After a developer implements it and publishes it to the system, the system calls the IMallocSpy "pre" method just before the corresponding IMalloc method, effectively allowing the debug code to "spy" on the allocation operation, and calls the "post" method to release the spy.
For example, when COM detects that the next call is a call to IMalloc::Alloc, it calls IMallocSpy::PreAlloc, executing whatever debug operations the developer wants during the Alloc execution, and then, when the Alloc call returns, calls IMallocSpy::PostAlloc to release the spy and return control to the code.
Related topics