?
Solved

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

Posted on 2001-08-02
2
Medium Priority
?
200 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 200 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

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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 brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 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