comp.lang.ada
 help / color / mirror / Atom feed
From: yogeshwarsing@gmx.com
Subject: Re: memory leak with new GPS in GNAT GPL 2012 on Windows
Date: Sat, 30 Jun 2012 10:58:58 -0700 (PDT)
Date: 2012-06-30T10:58:58-07:00	[thread overview]
Message-ID: <32f6a8d4-088b-4b9f-b390-16743672f56a@googlegroups.com> (raw)
In-Reply-To: <0513685d-9db7-4df9-8592-a463ccd175e9@googlegroups.com>

> I am using WinXP Family edition 32bits with SP3 on single core Celeron.
> I installed GNAT GPL 2012 but I noticed i must also change manually the environment variable PATH to use the updated gcc (I have GNAT GPL 2011 installed). Otherwise GPS 2012 use the binaries from the 2011 distro.

When installing GNAT GPL 2012, the item: C:\GNAT\2012\bin is added in the Windows environment path. C:\GNAT\2011\bin will still be there but C:\GNAT\2012\bin will be written in the path BEFORE C:\GNAT\2011\bin and so GPS 2012 will use binaries from C:\GNAT\2012\bin.

I think if you take away C:\GNAT\2012\bin from the path and then try to compile a program using the -gnat2012 switch (Project properties > switches > Ada) then it won't run as then the binaries from the 2011 distribution would be called and I do not think that the 2011 binaries were supporting the -gnat2012 switch.

> Task manager indicates 64 Megabytes of memory used by gps.exe with only 1 thread.
> I can compile and run several demos with or without tasking and no crash or leaks.
> I also noticed of 4 Kbyte increment of memory every second even when I do nothing.
> I think the leak could come from the GTK library. A leak in GTK has already been
> reported on this forum.

In my case when running the simple program below, I find an increase of 48 kbyte every second even when GPS is idle. Here is the simple program that I am running:

with System.Dim.MKS; use System.Dim.Mks;
with System.Dim.Mks_IO; use System.Dim.Mks_IO;
with Text_IO; use Text_IO;


procedure Free_Fall3 is
       subtype Acceleration is Mks_Type
       with Dimension => ("m/s^2", Meter => 1, Second => -2, others => 0);
       G : constant acceleration := 127137.6 * km/(hour ** 2) ;
       T : Time := 10.0/3600.0 * hour;
       Distance : length;

     begin
       Put ("Gravitational constant: ");
       Put (G, Aft => 2, Exp => 0); Put_Line ("");
       Put ("Time: ");
       Put (T, fore => 4, Aft => 4, Exp => 0); Put_Line ("");
       Distance := 0.5 * G * T ** 2;
       Put ("distance travelled in 10 seconds (or 10/3600 hour) of free fall ");
       Put (Distance, fore => 4, Aft => 4, Exp => 0);
       Put_Line ("");
end Free_Fall3;


Thanks.



  reply	other threads:[~2012-06-30 17:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-28 17:57 memory leak with new GPS in GNAT GPL 2012 on Windows yogeshwarsing
2012-06-28 18:25 ` Anh Vo
2012-06-29  7:06   ` yogeshwarsing
2012-06-29 16:35     ` Shark8
2012-06-29 16:36     ` Anh Vo
2012-06-30  7:39       ` yogeshwarsing
2012-06-30 12:11         ` Anh Vo
2012-07-02 17:11       ` Anh Vo
2012-06-30 16:08 ` francois_fabien
2012-06-30 17:58   ` yogeshwarsing [this message]
2012-07-01  8:54     ` Simon Wright
2012-07-01 10:51     ` francois_fabien
2012-07-01 12:55       ` Dmitry A. Kazakov
2012-07-01 20:01 ` sbelmont700
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox