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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f8b8f80c415d1eed,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!2g2000hsn.googlegroups.com!not-for-mail From: tkrauss Newsgroups: comp.lang.ada Subject: Memory leak in BLAS/LINPACK - GNAT on OS X Date: Wed, 16 Apr 2008 16:06:52 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7fa5fc26-6843-4000-bea7-f8a956b20b3f@2g2000hsn.googlegroups.com> NNTP-Posting-Host: 69.244.236.36 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1208387212 32631 127.0.0.1 (16 Apr 2008 23:06:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 16 Apr 2008 23:06:52 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 2g2000hsn.googlegroups.com; posting-host=69.244.236.36; posting-account=p-n8bgoAAAD87ewolofi_t9qPbDzbtBH User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20977 Date: 2008-04-16T16:06:52-07:00 List-Id: 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;