Solved

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

Posted on 2001-08-02
2
192 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
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now