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,FROM_NUMERIC_TLD autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3d9b089555215fa7 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!newsfeed.icl.net!news-lond.gip.net!news.gsl.net!gip.net!colt.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!news.theplanet.net!not-for-mail From: "Makhno" Newsgroups: comp.lang.ada Subject: Re: Ada memory management seems slow Date: Thu, 13 Oct 2005 19:39:43 +0100 Message-ID: References: <2621912.Es2GesFk5Z@linux1.krischik.com> NNTP-Posting-Host: 81.78.112.224 X-Trace: news6.svr.pol.co.uk 1129228875 24811 81.78.112.224 (13 Oct 2005 18:41:15 GMT) NNTP-Posting-Date: 13 Oct 2005 18:41:15 GMT X-Complaints-To: abuse@theplanet.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Xref: g2news1.google.com comp.lang.ada:5606 Date: 2005-10-13T18:41:15+00:00 List-Id: > GNAT uses malloc and free from the C library for memory management - so > performace is the same as with C. Only with C nobody measures the > performance - people just expect malloc and free to be as fast as > possible. I find this difficult to believe - I have experience of using free() in C, and unless the lists are far bigger than I think they are, C is nowhere near as slow as this. Is there any way I can check precisely what Ada is using? The program is calling something called FREE which is defined as some sort of deallocator called Ada.Unchecked_Deallocation >> I was wondering what options are available for memory management, or >> whether I am inadvertently using a 'slow' mode. > > Well there is indeed a memory debug option - but its off by default. I'm using gnatmake with -O3.