Re: Can I Increase size of nNoMansLandSize?
- From: "AliR \(VC++ MVP\)" <AliR@xxxxxxxxxxxxx>
- Date: Wed, 16 Jan 2008 15:59:48 GMT
Does this only happen in Release mode?
AliR.
"Chris Shearer Cooper" <chris_web@xxxxxxx> wrote in message
news:13oqkn42often9a@xxxxxxxxxxxxxxxxxxxxx
My application, for some reason, is writing a single DWORD into a random
location in its memory (the value is always 0x00000001), and I'm trying to
find out where!
I can't find any rhyme or reason to when this happens, so right now the
best I can do is stick a bunch of calls to _CrtCheckMemory() all over the
program and hope that the corruption will (1) hit a memory block in a way
that _CrtCheckMemory() can see it, and (2) that I will eventually be able
to narrow down _when_ this is happening.
But I had a thought. If I could tap into the MFC debug allocation scheme,
and increase the size of nNoMansLandSize, then the chance of the bug
hitting an area of memory that I could detect would increase greatly!
But there doesn't seem to be any way to do this, outside of rebuilding the
MFC libraries, which I guess is a possibility, but not one I'm looking
forward to.
I can't find any other way to tap into the new/debug scheme. I tried
overriding new and delete, but got a bunch of "symbol already defined"
errors. I was thinking if I could tap into that, I could just increase
the size of every allocation (so if the caller wanted 4 bytes, I'd
actually allocate 40 and fill the extra 36 in with something I could check
later).
Any suggestions as to the least painful way to track down this problem?
Thanks!
Chris
.
- Follow-Ups:
- Re: Can I Increase size of nNoMansLandSize?
- From: Chris Shearer Cooper
- Re: Can I Increase size of nNoMansLandSize?
- References:
- Can I Increase size of nNoMansLandSize?
- From: Chris Shearer Cooper
- Can I Increase size of nNoMansLandSize?
- Prev by Date: Re: Using a callback function name as an argument in a function
- Next by Date: Re: Bargraphs in VC++ 6.0
- Previous by thread: Re: Can I Increase size of nNoMansLandSize?
- Next by thread: Re: Can I Increase size of nNoMansLandSize?
- Index(es):
Relevant Pages
|