Miklos Cserzo wrote:
On Mon, 24 Sep 2001, Martin Liddle wrote:
There certainly was a serious memory leak problem in the run time system that gave us a lot of grief, however it was fixed by Frank in late May so it isn't that one you are seeing. We certainly aren't currently seeing any memory leaks in applications that run for several days at a time. You will need to provide some more information to help in isolating the problem. Can you provide a reasonable size test program that demonstrates the problem?
My code is a bit complex I rather wouldn't post it unless it's unavoidable. All I can say now: there is no dynamic memory allocation involved nor pointers nor anything notoriously easy to make it wrong. Only very basic straight Pascal.
There is a known problem. Some operations (esp. string concatenation) need temporary storage (on the stack) which isn't freed immediately, so it will accumulate in loops. A trivial example follows.
program Foo;
var s: String (100) = '';
begin repeat s := s + '' until False end.
I think we know the cause of the problem (alloca_string if anyone cares) and therefore can fix it soon.
The only know work-around for know is to move the loop body into a subroutine. That's not nice, but if it works, you can at least be quite sure it's this problem you see.
Frank