<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
</head>
<body>
<div style="margin: 5px 0px 5px 0px;">
<br/>
Martin <lazarus@mfriebe.de> hat am 15. August 2011 um 17:27 geschrieben:
<br/>
<br/>
>[...]
<br/>
> > In the mean time I found where the refcount increases:
<br/>
> > DoOpenUnknownFile
<br/>
> > ->CodeToolBoss.GetSourceType
<br/>
> > ->FCurCodeTool.GetSourceName
<br/>
> > ->TPascalReaderTool.BuildTree<- this where the refcount increases to 2
</div>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">Correct. One for the scanner that scans the compiler directives and extracts the "cleaned source" and one for the parser that reads the pascal. </p>
<p style="margin: 0px;">Additionally the codetools caches the file sources (i.e. the files converted to UTF-8). </p>
<p style="margin: 0px;">The biggest part of the files are kept in cache and closing the project does not free this cache. </p>
<p style="margin: 0px;">For example once the codetools have loaded and parsed the classes.pp it is kept in memory. </p>
<p style="margin: 0px;">This was so from the beginning (at least since 9 years). </p>
<p style="margin: 0px;">Of course the RTL and FCL sources grew over the years and so the codetools need more memory.</p>
<p> </p>
<p>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.</p>
<p>There is a lot of other stuff, but this makes only a few percent. </p>
<p> </p>
<p>In my experiments memory fragmentation can tripple the amount of memory needed by the codetools. </p>
<p> </p>
<p>AFAIK the several hundred MB of ram needed by the IDE was no problem yet - even for student machines.</p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">Mattias</p>
<p> </p>
</body>
</html>