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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e06ac014b37d3dcd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-24 18:14:42 PST Message-ID: <3E31F10B.FA064739@sympatico.ca> From: David Marceau X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.17-10mdksmp i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Memory chunks: are they much speed-up? References: <3e30f9a1$0$33922$bed64819@news.gradwell.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 24 Jan 2003 21:06:03 -0500 NNTP-Posting-Host: 65.92.163.168 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1043460598 65.92.163.168 (Fri, 24 Jan 2003 21:09:58 EST) NNTP-Posting-Date: Fri, 24 Jan 2003 21:09:58 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:33417 Date: 2003-01-24T21:06:03-05:00 List-Id: Victor Porton wrote: > > Is allocating memory in chunks by several (small) objects at once a > significant speed-up (compared to standard allocators) in typical Ada > impl.? If you follow ravenscar or spark I don't think you're even allowed to allocated dynamically small or big chunks. Everything is static. Memory leaks are not a problem in that way. Going back to your question though if it wasn't critical or high-integrity, then yes using memory pools each dedicated to a certain type of object and then reserving the memory pools in advance is certainly much more efficient. If ever one of the memory pools is full, no problem just dynamically allocate another memory pool dedicated to the object type in question. I have seen one library product dedicated to c/C++ programmers in this area in the past. SmartHeap by Microquill. You might want to check it out. Do memory pools impact/improve software performance? Yes. I hope this helps. Cheers, David Marceau