[Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem

Free Pascal - Lazarus mailing list
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
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem

Free Pascal - Lazarus mailing list
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.
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem

Free Pascal - Lazarus mailing list
On 13/05/2018 13:16, Werner Pamler via Lazarus wrote:

> 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.
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem

Free Pascal - Lazarus mailing list
On 05/13/2018 02:05 PM, Martin Frb via Lazarus wrote:

> If it happens while linking, try to disable smart-linking.

That fixed problem. Thanks !

zeljko

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
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 via Lazarus wrote:

> 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.


--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem

Free Pascal - Lazarus mailing list
On Mon, May 21, 2018 at 10:44 PM, Andreas Frieß via Lazarus
<[hidden email]> 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
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Mon, 21 May 2018 21:44:59 +0200
Andreas Frieß via Lazarus <[hidden email]> 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?

Mattias
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem

Free Pascal - Lazarus mailing list
Mattias Gaertner via Lazarus wrote:

> On Mon, 21 May 2018 21:44:59 +0200
> Andreas Frieß via Lazarus <[hidden email]> 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;
 


--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus