Solved

Looking for C++ function to inform if memory has been allocated.

Posted on 2001-08-02
2
198 Views
Last Modified: 2013-11-20
I'm trying to find a MFC or C++ function to tell me wether heap memory at a given address has been allocated or is in use.  Assuming there is such a function, what is it?  Thanks...
0
Comment
Question by:halen
[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
2 Comments
 
LVL 2

Accepted Solution

by:
Lockias earned 50 total points
ID: 6346376
What are you trying to do?  There is AfxIsMemoryBlock and AfxIsValidPointer.  Also there is also _CrtCheckMemory, and a few other _Crt functions.  I don't think this directly solves your problem, but maybe a step in the right direction.

~Lockias
0
 

Author Comment

by:halen
ID: 6348683
Thanks...  AfxIsMemoryBlock() is what I was looking for.  I'm writing a test tool for work using a linked list and my algorithm needs that function to determine if I need to allocate memory or not when the user is incrementing through the list.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

688 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