Board index » delphi » query: what is FreePtr in TP4, and...

query: what is FreePtr in TP4, and...

Hi Cyb,

That's from the good old days, there didn't exist garbage collectors,
fowever the freelist did, the free pointer could be used to see if there
is room free. The number of bytes from freepointer to the end of the
heap can be used as free heap space. The free list keeps track of all
disosed variables. It was a lot of work.
Try not using this you've probably enough memory now! Easilly do new and
dispose or getmem, freemem. Don't look at the freelist.
The turbo-3 unit still exists up to tp7 so you could include the unit
TURBO3.
It should work then. However I have not used it for a long time. But I'm
sure freemem is in.

Success,

Ben

 

Re:query: what is FreePtr in TP4, and...


I've been placed in the enviable position (laugh) of trying to
fix/modisy/maintain some code which was written for Turbo Pascal 3.
Joy! :P~~~

This code was later moved to TP4, and then left fallow until recently.

None of the code has any useful commenting, and I've been forced to
discover much of its inner workings by clairvoyance and/or slogging
through it.

A few things have me puzzled, but the ones which are truly opaque to
me are the function of FreePtr and (erm, memory failure - MemFree or
something).  They're both memory functions I can see, and I've read
what FreePtr actually *does* - but those variables no longer appear in
BP7.

Guess what I have to recompile with? :)

If anyone knows the details of the changes made to this area when
Borland upgrade the versions, I'd be *really* grateful if you'd let me
know.

Replies by email, and I'll post the results if it's a popular subject.

Thanks.

Other Threads