From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c0567ec88842f790 X-Google-Attributes: gid103376,public From: Rick Gillmore Subject: Re: Memory leak in porting VAX/VMS -> AXP/VMS Date: 1996/04/10 Message-ID: <4kgaas$bt9@crissy.ge.com>#1/1 X-Deja-AN: 146720747 references: content-type: text/plain; charset=us-ascii organization: GE Drive Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 1.1N (Windows; I; 16bit) Date: 1996-04-10T00:00:00+00:00 List-Id: 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