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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f8b8f80c415d1eed X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!feed.xsnews.nl!border-2.ams.xsnews.nl!eweka.nl!hq-usenetpeers.eweka.nl!69.16.177.246.MISMATCH!cyclone03.ams!news.ams.newshosting.com!npeersf01.ams!newsfe05.ams2.POSTED!40385e62!not-for-mail Message-ID: <480997C6.3030004@bredband.net> From: Per Sandberg User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Memory leak in BLAS/LINPACK - GNAT on OS X References: <7fa5fc26-6843-4000-bea7-f8a956b20b3f@2g2000hsn.googlegroups.com> In-Reply-To: <7fa5fc26-6843-4000-bea7-f8a956b20b3f@2g2000hsn.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@WWWSpace.NET NNTP-Posting-Date: Sat, 19 Apr 2008 02:56:30 EDT Date: Sat, 19 Apr 2008 08:57:10 +0200 Xref: g2news1.google.com comp.lang.ada:20997 Date: 2008-04-19T08:57:10+02:00 List-Id: Thought it i recognized this problem so i checked it out and found: It is corrected in the Latest GNATPro version (the problem is in the compiler). /Per tkrauss wrote: > There have been a few messages on the GNAT-OSX mailing list about an > apparent memory leak in the Ada.Numerics.Long_Real_Arrays > implementation. The setup is an OS X box (10.4) with the GNAT 4.3 > compiler from the macada.org site. The Ada.Numerics.Long_Real_Arrays > is using the Apple-supplied BLAS and LINPACK libraries under the > hood. The code snippet below (plagiarized from Jerry's post on the > mailing list) leaks memory (as reported by top). Note that the same > code but with Long_Complex types does not appear to have this problem. > > Has anyone seen this problem on other platforms? Do other languages > on OS X behave this way? I'm not sure how to track down the guilty > party here. Is it Apple's BLAS or LINPACK libraries or something in > the GNAT Long_Real_Arrays multiply method? > > > with Ada.Numerics.Long_Real_Arrays; > use Ada.Numerics.Long_Real_Arrays; > > procedure tst_simple is > v : Real_Vector(1 .. 100_000) := (others => 1.23); > res : Real_Vector(1 .. 100_000); > begin > for i in 1..1000 loop > res := 123.456 * v; > end loop; > end tst_simple; >