Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-05

Lazarus win32 with fpc-3.0.4 no memory left problem

8 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

zeljko

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 ?

Thanks,

zeljko

Reply by email

Werner Pamler
to zeljko
zeljko wrote 9 lines
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.

There was a discussion on this issue recently:
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.

Reply by email

Martin Frb
to Werner Pamler
Werner Pamler wrote 20 lines
Am 13.05.2018 um 12:00 schrieb zeljko via Lazarus: > 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. There was a discussion on this issue recently: 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.

Reply by email

Andreas Frieß
to Werner Pamler: I have that issue, too. It happens on the 32-bit IDE only, when "many" packages are…

If someone can backport this please. The fix from Bugreport 0031517 to the actual stable or must this a extra feature report ?

Andreas

Werner Pamler wrote 20 lines
Am 13.05.2018 um 12:00 schrieb zeljko via Lazarus: > 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. There was a discussion on this issue recently: 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.

Reply by email

Juha Manninen
to Andreas Frieß
Andreas Frieß wrote
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

Reply by email

Andreas Frieß
to Mattias Gaertner
Mattias Gaertner wrote 11 lines
On Mon, 21 May 2018 21:44:59 +0200 Andreas Frieß via Lazarus wrote: > 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

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;

Reply by email