Windows Heap Overrun Monitoring

Heap is one of the most important memory structures used by almost every programs. Windows Heap Manager is at core of heap management. In this blog, I would like to focus on the heap monitoring feature provided by Windows Heap Manager and some other useful tools in the context of detecting heap overrun. All the…

3

Build a free distributed project hosting using Mercurial and Windows Live Mesh

For a small distributed project team, for example, a two-person’s team moonlighting for Windows Phone 7 applications/games, it is not necessarily a simply job to find a free or low-cost private/close source project hosting service: either they are too unreliable, or they come with too many limitations, and of course, the ads. Thus, besides getting…

1

Case Study: How to debug 64-bit managed windows service at startup

Sometimes you might need to debug a windows service which is written in managed code and it is running on 64-bit windows, and to make the matter worse, the bug happens during the service startup. Without adding instrument codes into your binary, this could be a difficult setup to do debugging, because: Services Control Manager…


Case Study: Pack Mismatch

Packing is a way to arrange data  in memory using padding technique to align data at a memory offset equal to multiple of a fix size (usual the word size, but it could be byte size, DWORD size or any other size). The purpose of packing is to align the data memory layout to the…


Case Study: Debug distributed application using packet analyzer

Packet analyzers are powerful tools to troubleshoot remote communications between distributed applications. Microsoft are creating various new frameworks to lower the bar/cost for the developers to build distributed applications in Windows ecosystem, while those new technologies introduces additional layers and abstractions on top of existing APIs. And sometimes, if certain error happens in the lower…


Graceful Completion of Thread Pool Wait Callback

Windows thread pool API helps the developer to deal with the burdens of thread lifetime and management, so that he/she only needs to focus on writing his/her work code as a callback function, and let it be automatically invoked by the thread pool thread. Books, such like [CPW08] chapter 7 and [WVCC07] chapter 11, and…