?
Solved

HEAP [example.exe]: "Number of free blocks in arena (69) does not match number in the free lists (68)"

Posted on 2004-09-29
7
Medium Priority
?
694 Views
Last Modified: 2007-12-19
This is a VERY difficult problem were having when we exit the main application in runtime. It does not come up in DEBUG mode. Im using Visual C++ V6 Service Pack 6 under Windows XP Pro.

Error Message: "HEAP:[example.exe] Number of free blocks in arena (69) does not match number in the free lists (68)

When it exits the main application the above error message comes up after it completes the exit instance in the main application.

Has anyone got any ideas what this error means and how to diagnose and fix the problem. The main application is very big.

Many thanks

Mike
0
Comment
Question by:Mike38
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 2

Accepted Solution

by:
carribus earned 672 total points
ID: 12178031
The last time I heard the term "arena" was back in the good old DOS days when one had to know about "arenas" of memory for virtual memory managers and so on. I went and did some reading in the MSDN, and it seems that Windows has 2 different "versions" of memory arenas, specifically one version for Win9x and ME, and another for the NT based Windows (for obvious reasons).

Coming back to your question, I don't have an answer for you, but I do have a few suggestions and queries.

1. In your application, are you performing any 'unusual' memory operations? perhaps dipping down into the metal with a few _asm { } blocks of code?
2. Do you have your own memory manager running in this app? Does it do any Virtual Memory calls during the execution of the app? If yes, make sure that all the calls are terminated correctly and all handles are closed.

Thats about all I can think of. If I find anything else, I'll post.
0
 

Author Comment

by:Mike38
ID: 12178084
Many thanks for the quick reply.

I don't do any unsual memory operations like _asm and I don't use my own memory manager app. I also make sure the calls are terminated correctly and handles closed.

Very strange bug error message.

Mike
0
 
LVL 22

Assisted Solution

by:grg99
grg99 earned 664 total points
ID: 12178469
You're probably zapping some bytes past the end of one of the blocks you allocate.   I'd use some heap debug tool that checks for this.  Or you can roll your own malloc() and free() wrappers that check for this.

0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 664 total points
ID: 12179460
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question