Re: [fpc-pascal] Inline methods

2016-05-20 Thread Sven Barth
Am 19.05.2016 08:52 schrieb "LacaK" : > > >> >> >> Additionally, it's possible that it's not possible to inline generic routines in regular routines, >> > >> > It is not my case. >> > I use this generic in another generic and then it is specialized in interface section of same

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread Michael Van Canneyt
On Fri, 20 May 2016, OBones wrote: Lukasz Sokol wrote: On 20/05/16 09:40, Graeme Geldenhuys wrote: On 2016-05-20 09:36, Graeme Geldenhuys wrote: I think a “x percentage of capacity” increment is the way to go. eg: 5 or 10% Scrap that idea. In hind sight, % increments is what is causing the

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread OBones
Lukasz Sokol wrote: On 20/05/16 09:40, Graeme Geldenhuys wrote: On 2016-05-20 09:36, Graeme Geldenhuys wrote: I think a “x percentage of capacity” increment is the way to go. eg: 5 or 10% Scrap that idea. In hind sight, % increments is what is causing the problem. Regards, Graeme And

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread Lukasz Sokol
On 20/05/16 09:40, Graeme Geldenhuys wrote: > On 2016-05-20 09:36, Graeme Geldenhuys wrote: >> I think a “x percentage of capacity” increment is the way to go. eg: 5 >> or 10% > > Scrap that idea. In hind sight, % increments is what is causing the problem. > > Regards, > Graeme And actually

Re: [fpc-pascal] Parser Generator

2016-05-20 Thread Mark Morgan Lloyd
Marc Santhoff wrote: For the last 30 years or so I've been using a compiler compiler originally written in 1964, the implementation has matured as different pascal compilers have become available. I'm not suggesting that this is usable in the general case, but looked at objectively it does

Re: [fpc-pascal] Parser Generator

2016-05-20 Thread Marc Santhoff
On Fr, 2016-05-20 at 10:53 +0200, Marc Santhoff wrote: > There are some tools I liked very much when dealing with language > translation in the past, but they don't fit her. None of them generates ^e "they don't fit here." Fatal typo. I know

Re: [fpc-pascal] Parser Generator

2016-05-20 Thread Marc Santhoff
On Fr, 2016-05-20 at 08:38 +, Mark Morgan Lloyd wrote: > Marc Santhoff wrote: > > On Do, 2016-05-19 at 13:10 +0200, Torsten Bonde Christiansen wrote: > > > >> * GOLD Parser: http://www.goldparser.org/ > > >> * COCO/R: http://www.ssw.uni-linz.ac.at/Research/Projects/Coco/ > > >> * TP

Re: [fpc-pascal] Parser Generator

2016-05-20 Thread Carlo Kok
On 2016-05-19 13:10, Torsten Bonde Christiansen wrote: Hi. I am currently looking into integrating a custom language parser into my program and have been searching the web for parser generators that can create Pascal code from a custom language. So far in my search i have found the following

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread Graeme Geldenhuys
On 2016-05-20 09:36, Graeme Geldenhuys wrote: > I think a “x percentage of capacity” increment is the way to go. eg: 5 > or 10% Scrap that idea. In hind sight, % increments is what is causing the problem. Regards, Graeme ___ fpc-pascal maillist -

Re: [fpc-pascal] Parser Generator

2016-05-20 Thread Mark Morgan Lloyd
Marc Santhoff wrote: On Do, 2016-05-19 at 13:10 +0200, Torsten Bonde Christiansen wrote: * GOLD Parser: http://www.goldparser.org/ * COCO/R: http://www.ssw.uni-linz.ac.at/Research/Projects/Coco/ * TP Yacc/Lex: (included in Free Pascal)

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread Graeme Geldenhuys
On 2016-05-20 07:02, LacaK wrote: > So second question is can TFPList.Expand be modified, that for large > FCapacity will be used smaller increment ? I think a “x percentage of capacity” increment is the way to go. eg: 5 or 10% Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread LacaK
What about to simply adjust Expand procedure like: if FCapacity > 8*1024*1024 then IncSize := FCapacity shr 3 else if FCapacity > 128 then IncSize := FCapacity shr 2 else if FCapacity > 8 then IncSize := 16 else IncSize := 4; SetCapacity(FCapacity + IncSize); It does not solve your

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread Michael Van Canneyt
On Fri, 20 May 2016, LacaK wrote: As new nodes are appended TFPList.Expand is called And there is: if FCapacity > 127 then Inc(IncSize, FCapacity shr 2); So if I have in list 1 000 000 items, then at once list is expanded by 250 000, which causes in one step out of memory So my

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread LacaK
- Using SAX and not store the whole DOM in memory, and at the same time use your own memory allocation routines for your structures. Good idea. I was not aware of such option. (Unfortunatelly all work and testing on application was done, so rewrite is completelly is brrr ;-( ) Thanks

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread LacaK
As new nodes are appended TFPList.Expand is called And there is: if FCapacity > 127 then Inc(IncSize, FCapacity shr 2); So if I have in list 1 000 000 items, then at once list is expanded by 250 000, which causes in one step out of memory So my question is: can I somehow control increment

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread Michael Van Canneyt
On Fri, 20 May 2016, Marco van de Voort wrote: In our previous episode, LacaK said: As new nodes are appended TFPList.Expand is called And there is: if FCapacity > 127 then Inc(IncSize, FCapacity shr 2); So if I have in list 1 000 000 items, then at once list is expanded by 250 000,

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread Michael Van Canneyt
On Fri, 20 May 2016, LacaK wrote: Btw is there any limit for number of memory block, which can be requested ? As far as my XML file has milions of nodes, may be that for each node is created instance of TDOMNode class (or TDOMElement I do not know), which in turn can cause that there is

Re: [fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread Marco van de Voort
In our previous episode, LacaK said: > As new nodes are appended TFPList.Expand is called > And there is: >if FCapacity > 127 then Inc(IncSize, FCapacity shr 2); > > So if I have in list 1 000 000 items, then at once list is expanded by > 250 000, which causes in one step out of memory > So

[fpc-pascal] TFPList.Expand was: Maximum of memory which can be used by single program in 32 bit Windows

2016-05-20 Thread LacaK
Btw is there any limit for number of memory block, which can be requested ? As far as my XML file has milions of nodes, may be that for each node is created instance of TDOMNode class (or TDOMElement I do not know), which in turn can cause that there is large amount of relative small memory