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-Thread: 103376,de85c452b42b049 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.156.18 with SMTP id u18mr331494bkw.3.1333642989104; Thu, 05 Apr 2012 09:23:09 -0700 (PDT) Path: h15ni89379bkw.0!nntp.google.com!news1.google.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED.82.30.107.66!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Tasking, AWS and segmentation faults Date: Thu, 05 Apr 2012 17:22:09 +0100 Organization: A noiseless patient Spider Message-ID: References: <12873826.360.1333555697441.JavaMail.geo-discussion-forums@vbhc14> <4f7caeb8$0$6640$9b4e6d93@newsspool2.arcor-online.net> <11022851.605.1333622309882.JavaMail.geo-discussion-forums@vbug19> <4f7d7c1b$0$7620$9b4e6d93@newsspool1.arcor-online.net> <30430138.605.1333639208754.JavaMail.geo-discussion-forums@vbbbg2> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="82.30.107.66"; logging-data="15361"; mail-complaints-to="abuse@eternal-september.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:YDZLloS2q8yzuGtqSql9nGiCtmQ= Content-Type: text/plain; charset=us-ascii Date: 2012-04-05T17:22:09+01:00 List-Id: tonyg writes: > On Thursday, 5 April 2012 12:03:55 UTC+1, Georg Bauhaus wrote: >> On 05.04.12 12:38, tonyg wrote: >> > Thanks for your help guys its working lovely now and I know >> > something new! >> > >> > What I did was (after reading the advice here) was I used a pointer >> > and declared a 'new type' and then passed that pointer around. >> >> For the sake of completeness, and without knowing what >> you are actually doing, so I could be quite wrong, you >> can still pass Pointer.all around (or rename this and >> pass it around as before). >> Large arrays are typically passed around by reference. >> Dereferencing keeps the impact of using pointers local, >> and easy to change again, just in case. > > ooh ooh I forgot to dereference it! jeepers. Thanks for that you have > just extended the life of my webserver beyond a fwe requests! I think you mean deallocation; and yes, indeed you should! What Georg meant was that your called subprograms could still take array parameters: type Arr is array (Natural range <>) of Thing; procedure Sub (A : in out Arr); type Arr_P is access Arr; Actual : Arr_P := new Arr (0 .. 65535); Sub (A => Actual.all);