[Lazarus] RE : RE : RE : RE : RE : RE : RE : Console App Development

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Aug 15 19:08:31 CEST 2011



Martin <lazarus at mfriebe.de> hat am 15. August 2011 um 17:27 geschrieben:

>[...]
> > In the mean time I found where the refcount increases:
> > DoOpenUnknownFile
> > ->CodeToolBoss.GetSourceType
> > ->FCurCodeTool.GetSourceName
> > ->TPascalReaderTool.BuildTree<- this where the refcount increases to 2 
Correct. One for the scanner that scans the compiler directives and extracts the
"cleaned source" and one for the parser that reads the pascal. 
Additionally the codetools caches the file sources (i.e. the files converted to
UTF-8). 
The biggest part of the files are kept in cache and closing the project does not
free this cache. 
For example once the codetools have loaded and parsed the classes.pp it is kept
in memory. 
This was so from the beginning (at least since 9 years). 
Of course the RTL and FCL sources grew over the years and so the codetools need
more memory.
 
The other big caches of the codetools are the code nodes. The memory need varies
greatly depending on the code, but they typically need somewhat less than the
sources.
There is a lot of other stuff, but this makes only a few percent. 
 
In my experiments memory fragmentation can tripple the amount of memory needed
by the codetools. 
 
AFAIK the several hundred MB of ram needed by the IDE was no problem yet - even
for student machines.
 
 
Mattias
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110815/cada9379/attachment-0003.html>


More information about the Lazarus mailing list