[fpc-devel]Memory exhausted
Peter Vreman
peter at freepascal.org
Wed Apr 4 09:51:40 CEST 2001
> Hello,
>
> >> Panic : Internal compiler error, exiting.
> >> rscfilebank.pp(51,25) Fatal: Internal error 9999
> >> rscfilebank.pp(1,9) Error: Forward class definition not resolved "TFileBank"
> >
> > That's a bug in the compiler. We've already fixed a lot of such bugs (crashes when
reompiling a
> > program without first deleting the results of the previous compilation), but new ones
always
> > seem to pop up.I this regard, 1.0.4/1.0.5 is much more stable.
>
> I think there's some other type of problem... When I compile some
> "main" module compiler tends to recompile other dependent modules even
> after the first correct compilation. Dunno why this is necessary. And
> the final EXE tends to grow after such second-time passes.
Also when using -Xs to strip the symbol tables?
The reason is that the registers used in a procedure are also stored in the ppu file. A
second time that you recompile your project it could find that some units have change the
usedregisters field and therefor want to recompile.
For interdependent units the 'problem' is that when parsing the interface declarations the
usedregisters field is set to all registers are used. When an other unit is then compiled
first, because the current unit dependents on it from the implementation and the other
unit dependents on the current unit from the interface. Then the crc of the unit is
calculated with the current value where all the procedures have set all registers used.
Hope that this makes it clear how complex the whole situation is. And if you're going to
talk about a more clever method of dependency generation (from your other mail), you must
also remember that Delphi is less stable with unit interdependencies than FPC. When you
want to compare delphi then you must use the -m switch (make modified units) to be equal
to FPC.
> I think this is all happening because of unit interdependencies... Maybe
> it is really necessary to implement something new in this field?
Try compiling with -Ca, this will set all registers to used for each procedure.
More information about the fpc-devel
mailing list