[fpc-devel] removed MaxAvail,MemAvail,HeapSize
Hans-Peter Diettrich
DrDiettrich at compuserve.de
Mon May 23 11:00:57 CEST 2005
Konstantin Münning wrote:
> I would hapily contribute the code for a better MemAvail/MaxAvail
> function if that's the problem. I would like to be able to use the
> latest compiler which now I definitely can't as I must have the BP7
> compatibility which is very good in 1.0.10.
IMO we have two issues here:
- compiler compatibility
- platform portability
The BP7 handling is very platform specific, and it doesn't make much
sense to implement the legacy DOS/Go32 API for other (multitasking...)
platforms. It would just *prevent* easy porting of such code, when the
functions returned some inadequate value on other platforms, at runtime,
making the program either fail immediately or crash later.
This means that such code *must* be changed (conditionalized...) before
it can be compiled for other platforms. Such a change can be enforced
when the legacy API only is implemented for DOS compatible target
platforms, inavailable on other platforms. But this doesn't mean that
the API is completely removed, it should exist and behave as before, on
the platforms to which it applies.
With regards to compiler compatibility I see no need for special
handling of this API, it is "standard" Pascal with no special
syntactical/semantical aberrations?
DoDi
More information about the fpc-devel
mailing list