[Lazarus] RE : RE : RE : RE : Console App Development
Martin
lazarus at mfriebe.de
Sun Aug 14 16:04:04 CEST 2011
On 14/08/2011 14:36, Ludo Brands wrote:
>> Now once it is known that this does happen, the same may
>> happen for any
>> other of the "unfreed" memory. It may or may not. It is
>> totally unknown.
>> Of all the unfreed memory, when you close the editors, or project
>> anything from 0.1% to 99.9% could be hold by the memory manager.
>>
> But then it would be re-used later on, unless there is a major bug in the
> memory manager. I repeat myself, but 30M is lost every unload/load cycle of
> the same 450 files.
I think the above may have been lost in the rest.
yet, while you certainly have a point. It isn't proof. it could be
argued fragmentation based inability to re-use. Though I accept the
lower likelihood of it.
Yet at least part of it may be.
I tried the process about 20 times (on windows). The first 4 or 5 times
the increase was big, it then however decreased, and at the end there
was very little further increase, when adding the files again, and
removing them (memory would be higher while they where added, but for
each cycle the memory would go down as well)
NOTE: I do not deny the possibility of an issue. But all the symptoms
can be explained in other ways too. likelihoods may go either way. But
in the end, unless someone can show actual code that does not release
the data it allocated (or unnecessarily defers this), it appears that
there is nothing that can be proven either way.
The fact that lazarus has a higher base-usage of memory, is not in
itself wrong. It is only wrong if it can be shown that the memory is
used for none necessary data.
I accept that some people like to keep hundreds of files in an
"accessible" or "open" list. And for that purpose people keep this files
open in tabs of the editor.
One way for an editor to allow that, is what MSEide does => Do not
actually load the files.
But most editors are not designed for this, neither is Lazarus. This is
not a wrong design, nor is it a fault. This is at best a feature that
isn't implemented. Actually, some PARTS of it are implemented, like
the deferred scanning.
More information about the Lazarus
mailing list