Mail Archives: djgpp/1997/09/08/04:03:02
*** Brett *** wrote:
>
> Hello everyone!
>
> Okay, who would like to help me this time?
>
> I'm writing a program that is primarily for my own use. I would like to know
> _exactly_ how much free memory is left. Not how much physical RAM etc., just
> one that decrements 200 when I malloc something that big or use new on
> something that big. And also knows that when I free() it or delete it, the
> memory must be added back on.
>
> I want this because I need to know if my memory is leaking somewhere (making
> a local pointer 'new', then not deleting it and it goes out of scope...)
>
> I could just provide wrappers to the existing alloc functions to increment
> and decrement a global variable, but that would then misrepresent how much
> is actually free ('cause I know malloc and the rest cheat sometimes :)
[...]
You might check sentinel, Juan Jesus Alcolea Picazo, posted an announce
a week ago, or so. It is for C++, but as you mentioned new...
I lost the URL where to download it, so check out the mail archives
or mail him: a920101 AT zipi DOT fi DOT upm DOT es
HTH
--
Ciao
Tom
*************************************************************
* Thomas Demmer *
* Lehrstuhl fuer Stroemungsmechanik *
* Ruhr-Uni-Bochum *
* Universitaetsstr. 150 *
* D-44780 Bochum *
* Tel: +49 234 700 6434 *
* Fax: +49 234 709 4162 *
* http://www.lstm.ruhr-uni-bochum.de/~demmer *
*************************************************************
- Raw text -