comp.lang.ada
 help / color / mirror / Atom feed
From: Rick Gillmore <Gillmore-RE@salem.ge.com>
Subject: Re: Memory leak in porting VAX/VMS -> AXP/VMS
Date: 1996/04/10
Date: 1996-04-10T00:00:00+00:00	[thread overview]
Message-ID: <4kgaas$bt9@crissy.ge.com> (raw)
In-Reply-To: Mats.Weber-0904962310310001@mlma21.elca-matrix.ch

Mats.Weber@elca-matrix.ch (Mats Weber) wrote:
>Hi,
>
>We ran into a problem while porting a VAX Ada program from VAX/VMS to
>AXP (Alpha)/VMS using DEC's compiler.
>
>The program works fine on VAXes, but leaks lots of memory on the AXP. >Has anyone else had the same problem ? Does anyone know of t=
ools to >locate such leaks on an AXP/VMS machine (DEC's heap analyser is for >VAX/VMS only)?

We reported a problem with ADA V3.2 on the AXP which involved creating a 
string within a procedure call, and losing memory across the call.  This 
problem has been fixed in ADA V3.3.  If you are not running V3.3 on your 
AXP, I would suggest you upgrade.  The following program demonstrates the 
problem we had:

WITH Text_IO; USE Text_IO;
PROCEDURE Leak IS
   last_bytes, bytes : INTEGER;
   PROCEDURE Check (text : STRING) IS BEGIN NULL; END Check;
   PROCEDURE Get_Vm_Stats (code : IN INTEGER; value : OUT INTEGER);
   PRAGMA Interface (Ada, Get_Vm_Stats);
   PRAGMA Import_Procedure (Get_Vm_Stats, "Lib$Stat_Vm",
          (INTEGER, INTEGER), (REFERENCE, REFERENCE));
BEGIN
   Get_Vm_Stats (3, last_bytes);
   FOR size IN 0 .. 1000 LOOP
      Check ("Bad line " & Integer'Image(size));
   END LOOP;
   Get_Vm_Stats (3, bytes);
   Put_Line ("Lost" & Integer'Image(bytes-last_bytes) & " bytes.");
END Leak;

I don't know if this is your problem or not, but you may want to look for 
any such calls...

Good luck.

Rick Gillmore
GE Drive Systems





  parent reply	other threads:[~1996-04-10  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-09  0:00 Memory leak in porting VAX/VMS -> AXP/VMS Mats Weber
1996-04-09  0:00 ` Chet
1996-04-10  0:00 ` Rick Gillmore [this message]
1996-04-11  0:00 ` Mats Weber
1996-04-11  0:00 ` Larry Kilgallen
replies disabled

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