On 15/10/16 20:00, Michael Van Canneyt wrote:
issues, but I still get the following error:
OPTIQAP.PAS(18,21) Error: Identifier not found "HeapError"
OPTIQAP.PAS(19,6) Error: Identifier not found "HeapError"
This is possibly code intended for Turbo Pascal. The HeapError
identifier does not exist in Free Pascal. At least, I have not found any.
In some old Free Vision code, I found a reference to HeapError which seems
to be a callback function variable, but it is not active for Free
Pascal. I suggest you simply remove any lines that contain HeapError.
I've got a 5.0 manual to hand [blows dust off, coughs]. The function
takes size (bytes?) as parameter, returns 0 by default indicating that a
runtime error should be raised, but may alternatively return 1 (New or
GetMem should return Nil) or 2 (New or GetMem should retry).
Presumably it's in there to allow normal memory management to be
augmented with application-specific garbage collection, I've seen this
in the Pascal source for a Prolog system (not the Spivey one).
Perhaps Michael et al. would confirm this, but I'd expect FPC to use the
OS's memory management including virtual memory, so within limits I'd
not expect to see memory exhaustion in finite time. The residual use of
this function is to return Nil rather than forcing a run-time error if
there is an allocation problem.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal