Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-05

TList FCL Limitation Found

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Cliff Baeseman

Guys,
Here is a little something I found after 4 hours of battle with my lex scanner conversion. Once I figured this out I had it running in minutes.

TList is limited to 2045 object references. If you try to do more than that and immediate access violation will result. I do not know how it may affect the FCL code but is something you need to be aware of.

BTW I did manage to get the lex analyzer running very solid under fpc but I had to introlduce a little hack. I use multiple list to store the token object references.

Of course this will allow me to do syntax highlight, search to replace, class browsers etc. It is major fast most large files are tokenized in a 1/10 of a sec under linux..

Cliff

Reply by email

Michael Van Canneyt
to Cliff Baeseman
Cliff Baeseman wrote 7 lines
Guys, Here is a little something I found after 4 hours of battle with my lex scanner conversion. Once I figured this out I had it running in minutes. TList is limited to 2045 object references. If you try to do more than that and immediate access violation will result. I do not know how it may affect the FCL code but is something you need to be aware of.

Simple to solve: In Classesh.inc change the MaxListSize to whatever value you want (line 45)

{ Maximum TList size }

  MaxListSize = Maxint div 16;

But it shouldn't give an access violation ? An exception should be thrown ?

Michael.

Reply by email