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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3f0365b3a22c7556,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsfeed.gamma.ru!Gamma.RU!fr.ip.ndsoftware.net!proxad.net!infeed-3.proxad.net!nnrp3-1.free.fr!not-for-mail Date: Tue, 11 Oct 2005 22:56:40 +0200 From: Lionel Draghi User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1 X-Accept-Language: fr-fr, en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Heap vs Stack allocation Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <434c2709$0$21298$626a54ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 11 Oct 2005 22:56:41 MEST NNTP-Posting-Host: 82.236.216.140 X-Trace: 1129064201 nnrp3-1.free.fr 21298 82.236.216.140:35370 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:5552 Date: 2005-10-11T22:56:41+02:00 List-Id: The paper "Java theory and practice: Urban performance legends, revisited - Allocation is faster than you think, and getting faster" (http://www-128.ibm.com/developerworks/java/library/j-jtp09275.html?ca=dgr-lnxw07JavaUrbanLegends) explains (as far as I understand) how JVMs optimize "on-the-fly" memory allocation to use stack instead of heap, by using "Escape Analysis". My feeling is that those writing JVMs are working hard to guess the data lifetime and optimize memory allocation accordingly, because the language is unable to express this data locality. I think that Ada semantics open much more opportunity to use the stack (or registers). Am I right, or is this "Escape Analysis" something really powerful? -- Lionel Draghi http://en.wikibooks.org/wiki/Wikibooks:Book_of_the_month/September_2005