Solved

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

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl Awk Need Help 3 118
List out all word 7 293
FizzBuzz challenge 9 81
Sed question 2 86
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 …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

778 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