OK Who's a Windows expert? I've got a heaping problem!
#1
Registered User
Thread Starter
Join Date: Jul 2005
Location: Idaho
Posts: 71
Likes: 0
Received 0 Likes
on
0 Posts
OK Who's a Windows expert? I've got a heaping problem!
Alright lets find the true windows gurus here.
I wrote a WTL dialog that models a RF detector.
Sometimes when I run it I get a message stating a heap corruption. It says I wrote over the heap buffer.
Does this mean I overwrote the end of a dynamically allocated array? I don't think so, because if it was it would throw a different type of message.
Am I actually using up all the memory windows is allocating for my program?
And how do I debug it?
I wrote a WTL dialog that models a RF detector.
Sometimes when I run it I get a message stating a heap corruption. It says I wrote over the heap buffer.
Does this mean I overwrote the end of a dynamically allocated array? I don't think so, because if it was it would throw a different type of message.
Am I actually using up all the memory windows is allocating for my program?
And how do I debug it?
#2
Registered User
OK, I'm a little rusty here. What's a WTL dilog? I write machine code for 8051's and I also do some C# .NET stuff. The compiler usually takes care of that stuff.
The Heap is your memory area for variables. What it sounds like is you've got a stack overrun because of to many pushes and not enough pops. Check that you're not doing a recursive loop or some other strangeness like doing a jump out of a subroutine.
Edwin
The Heap is your memory area for variables. What it sounds like is you've got a stack overrun because of to many pushes and not enough pops. Check that you're not doing a recursive loop or some other strangeness like doing a jump out of a subroutine.
Edwin
#3
Registered User
Join Date: Aug 2005
Location: Puyallup, WA
Posts: 508
Likes: 0
Received 0 Likes
on
0 Posts
Here's a little help. As the article states heap corruption is a BIG topic and involves many things.
http://www.windowsitpro.com/Web/Arti...275/22275.html
Bottom-line, memory is being mishandled.
http://www.windowsitpro.com/Web/Arti...275/22275.html
Bottom-line, memory is being mishandled.
#4
Registered User
Thread Starter
Join Date: Jul 2005
Location: Idaho
Posts: 71
Likes: 0
Received 0 Likes
on
0 Posts
assertions are my friend. I was writing past the end of a dynamically allocated array. I try to be diligent in my assertions but obviously I missed a crucial one. Thanks guys.
Trending Topics
Thread
Thread Starter
Forum
Replies
Last Post
Rednecktastic
3rd Generation Ram - Non Drivetrain - All Years
10
11-15-2010 09:29 PM
markster
2nd Gen. Dodge Ram - No Drivetrain
6
10-07-2006 02:20 PM