Discussion:
[Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem
Martin Frb via Lazarus
2018-05-13 12:05:32 UTC
Permalink
Hi,
Using trunk lazarus r57911 and fpc-3.0.4 (32 bit), Windows 10.
When rebuilding ide from lazarus got "No memory left" while linking IDE.
I have bunch of 3rd party packages so I guess that too many units
triggers this error since "make bigide" from cmd works fine.
With fpc-3.0.0 everything works fine. Both win32 and win32-qt shows
same error.
Does anybody have such problem ? Is there any way to fix it ?
Does 3.1.1 trunk have such problem ?
I have that issue, too. It happens on the 32-bit IDE only, when "many"
packages are installed. Since I work on the JVCL port which consists
of a lot of packages, this happens regularly. I have to remove other
packages to get some memory back.
https://forum.lazarus.freepascal.org/index.php/topic,40351.0.html. If
I read correctly they seemed to fix the issue by a modified pp.pas
(reply -62), I did not test it myself, though.
If it happens while linking, try to disable smart-linking.
--
zeljko via Lazarus
2018-05-13 14:18:10 UTC
Permalink
Post by Martin Frb via Lazarus
If it happens while linking, try to disable smart-linking.
That fixed problem. Thanks !

zeljko

--
Andreas Frieß via Lazarus
2018-05-21 19:44:59 UTC
Permalink
If someone can backport this please. The fix from Bugreport 0031517 to
the actual stable or must this a extra feature report ?

Andreas
Hi,
Using trunk lazarus r57911 and fpc-3.0.4 (32 bit), Windows 10.
When rebuilding ide from lazarus got "No memory left" while linking
IDE. I have bunch of 3rd party packages so I guess that too many
units triggers this error since "make bigide" from cmd works fine.
With fpc-3.0.0 everything works fine. Both win32 and win32-qt shows
same error.
Does anybody have such problem ? Is there any way to fix it ?
Does 3.1.1 trunk have such problem ?
I have that issue, too. It happens on the 32-bit IDE only, when
"many" packages are installed. Since I work on the JVCL port which
consists of a lot of packages, this happens regularly. I have to
remove other packages to get some memory back.
https://forum.lazarus.freepascal.org/index.php/topic,40351.0.html. If
I read correctly they seemed to fix the issue by a modified pp.pas
(reply -62), I did not test it myself, though.
--
Juha Manninen via Lazarus
2018-05-24 07:45:14 UTC
Permalink
On Mon, May 21, 2018 at 10:44 PM, Andreas Frieß via Lazarus
Post by Andreas Frieß via Lazarus
If someone can backport this please. The fix from Bugreport 0031517 to
the actual stable or must this a extra feature report ?
Backport where? The fix is in FPC's code, not in Lazarus.

Juha
--
Mattias Gaertner via Lazarus
2018-05-25 06:29:36 UTC
Permalink
On Mon, 21 May 2018 21:44:59 +0200
Post by Andreas Frieß via Lazarus
If someone can backport this please. The fix from Bugreport 0031517 to
the actual stable or must this a extra feature report ?
See
https://bugs.freepascal.org/view.php?id=31517

Is the bug present in fpc 3.0.4?

Mattias
--
Andreas Frieß via Lazarus
2018-05-25 19:19:49 UTC
Permalink
Post by Mattias Gaertner via Lazarus
On Mon, 21 May 2018 21:44:59 +0200
Post by Andreas Frieß via Lazarus
If someone can backport this please. The fix from Bugreport 0031517
to the actual stable or must this a extra feature report ?
See
https://bugs.freepascal.org/view.php?id=31517
Is the bug present in fpc 3.0.4?
IMHO yes.

I think its not direct a bug, but the linking of Lazarus need sometimes
(with more packages) more memory in fpc.
The same problem occours if you ask for more memory on windows.

See also
http://forum.lazarus.freepascal.org/index.php/topic,40351.0.html
Post by Mattias Gaertner via Lazarus
Mattias
Andreas


A shot test for win 32 from the thread above
------------------
procedure TForm1.BuTestitClick(Sender: TObject);
const
coTestsize = 10*1024*1024;
coKB = 1024;
coMB = coKB * 1024;
var
list : TList;
i,j,aktIDX : Integer;
begin
list := TList.Create;
//
for i := 1 to 10000 do begin
if i mod 5 = 0 then Memo1.Append('Used size: ' +
IntToStr((i*coTestsize) div (coMB))+ ' MB');
aktIDX := list.Add(getmem(coTestsize)); // List of PChar
if list.Items[aktIDX] = pointer(0) then begin
Memo1.Append('No memory at : ' + IntToStr(i));
exit;
end;
for j := 0 to coTestsize-1 do begin
PChar(list.Items[aktIDX])[j] := #$FA;
end;
end;
list.Free;
end;

Loading...