Mail Archives: djgpp/1996/08/15/20:15:27
In article <32128C65 DOT 70ED AT cs DOT com>, John M. Aldrich <fighteer AT cs DOT com> wrote:
>Another way to determine if your program is referencing or otherwise using
>uninitialized memory is to include <crt0.h> and add the following line to
>your global variables:
>
>_crt0_startup_flags = _CRT0_FLAG_FILL_DEADBEAF;
>
>This causes all memory to be initalized with 0xdeadbeaf when it is
>allocated. If you see any variables with this value (or a fragment of
>it) then you are using uninitialized memory. It's worked for me any
>number of times. :)
I tend to use either 0xabbadead or 0xc0edbabe, but maybe that's just me.
--Brennan
--
brennan AT rt66 DOT com | "Barney vs. Mentos II: Unholy Alliance." Coming Soon.
Sending me unsolicited junk email grants me the right to end
your life in the manner of my choosing. You have been warned.
- Raw text -