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,345a8b767542016e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-20 09:07:48 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news.uunet.ca!tor-nx1.netcom.ca!news1.tor.metronet.ca!nnrp1.tor.metronet.ca!not-for-mail Message-ID: <3C98C195.2030705@home.com> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: memory leakages with Ada? References: <3c90af1e@news.starhub.net.sg> <3c91bfa3.1987537@news.demon.co.uk> <3C9629E3.8030109@home.com> <3C9645DD.4020006@mail.com> <3C9659B6.6030204@mail.com> <3C97E496.20404@mail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 20 Mar 2002 17:06:29 GMT NNTP-Posting-Host: 198.96.47.195 NNTP-Posting-Date: Wed, 20 Mar 2002 10:06:29 MDT Organization: MetroNet Communications Group Inc. Xref: archiver1.google.com comp.lang.ada:21492 Date: 2002-03-20T17:06:29+00:00 List-Id: Hyman Rosen wrote: > Larry Kilgallen wrote: > >> That code snippet _is_ in the caller's frame. Uppercase is the >> function being called. The bytes do get copied (obviously) to >> the caller's frame, but what you see above is the entire syntax >> for doing that. > > Yes, that's exactly what I was trying to say! > My point was that in the various C techniques, > the bytes of the result get constructed once, > and then don't have to be copied as part of > the function return, whereas returning a String > in Ada will involve copying the bytes. This can be a performance issue if the string is huge. But for mundane strings, the cost of copying it is much cheaper than the malloc/free cost, for example. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg