Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

636 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