Xref: news2.mv.net comp.os.msdos.djgpp:7319 From: brennan AT mack DOT rt66 DOT com (Brennan "The Reverend Bas" Underwood) Newsgroups: comp.os.msdos.djgpp Subject: Re: Debugging woes... Date: 15 Aug 1996 14:22:41 -0600 Organization: None, eh? Lines: 21 Message-ID: <4v00uh$pvk@mack.rt66.com> References: <199608122312 DOT JAA05520 AT gbrmpa DOT gov DOT au> <4uqhi6$hn1 AT news DOT rwth-aachen DOT de> <32128C65 DOT 70ED AT cs DOT com> NNTP-Posting-Host: mack.rt66.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <32128C65 DOT 70ED AT cs DOT com>, John M. Aldrich wrote: >Another way to determine if your program is referencing or otherwise using >uninitialized memory is to include 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.