This section of the archives stores flipcode's complete Developer Toolbox collection, featuring a variety of mini-articles and source code contributions from our readers.

 

  Using CrtCheckMemory()
  Submitted by



Lately I had to debug code that caused heap corruption, I found myself struggling against the computer in order to understand what causes the corruption and how.

In the search for memory validation APIs I have found _CrtCheckMemory() API which is being used by debug version of C run-time libraries. Using this API wrapped with an assert macro gives us the opportunity to check the heap every few lines of code without any overhead in release version: _ASSERTE( CrtCheckMemory()); it would be smart idea to use it even without any visible corruption, it saves time in the long run :-) This tip is based on information written on the MSDN. Nir Dremer
Pixel Software Technologies

The zip file viewer built into the Developer Toolbox made use of the zlib library, as well as the zlibdll source additions.

 

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.