Re: memory allocation problem
- From: "Oleg Starodumov" <com-dot-debuginfo-at-oleg>
- Date: Fri, 21 Oct 2005 13:40:55 +0300
> I'm having a memory allocation problem that I'm hoping someone can
> shed some light on. I'm betting that you'll tell me that I've
> done something bad to the heap, and after another 4 or 5 days looking
> for the problem I'll probably find that's the case. But I'm
> seeing some strange things that I thought might indicate some other
> problem.
>
Yes, if the error happens during heap allocation, heap corruption
is very probable. You can check for heap corruptions e.g. using PageHeap,
see configuration steps here:
http://www.debuginfo.com/tips/userbpntdll.html
> My application fails intermittently when its release build is launched
> outside of visual studio (I'm using Visual C++ .NET 2003 on Windows
> XP). I haven't been able to reproduce the problem launching it from
> Visual Studio, or launching the debug build outside of Visual Studio.
> I have tracked the problem down to the creation of a new object. The
> relevant part of the call stack at the time of failure seems to be:
>
How exactly does the application fail?
What is the complete call stack at the moment of failure?
Intermittent failures nonreproducible under debugger can also happen
because of race conditions (if the application is multithreaded).
> It looks to me like the size of the block that's getting allocated
> gets messed up after the call to HeapAlloc in _heap_alloc_base. I
> noticed that the value of _crtheap in the call to HeapAlloc is exactly
> the value of the messed up size parameter in the _nh_malloc call.
Could you please explain with a bit more details how have you noticed this effect?
I am not sure that I understand the steps that lead to this situation.
Regards,
Oleg
[VC++ MVP]
.
- Follow-Ups:
- Re: memory allocation problem
- From: Seth
- Re: memory allocation problem
- References:
- memory allocation problem
- From: Seth
- memory allocation problem
- Prev by Date: RE: Disabling exception trace messages
- Next by Date: Re: break point stay with (?)
- Previous by thread: memory allocation problem
- Next by thread: Re: memory allocation problem
- Index(es):
Relevant Pages
|
Loading