From: Simon Wright <simon@pushface.org>
Subject: Re: Tasking, AWS and segmentation faults
Date: Thu, 05 Apr 2012 17:22:09 +0100
Date: 2012-04-05T17:22:09+01:00 [thread overview]
Message-ID: <m2bon6i1xq.fsf@pushface.org> (raw)
In-Reply-To: 30430138.605.1333639208754.JavaMail.geo-discussion-forums@vbbbg2
tonyg <tonythegair@gmail.com> 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);
next prev parent reply other threads:[~2012-04-05 16:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 16:08 Tasking, AWS and segmentation faults tonyg
2012-04-04 19:09 ` Vadim Godunko
2012-04-04 20:27 ` Georg Bauhaus
2012-04-04 21:21 ` Jeffrey Carter
2012-04-05 10:38 ` tonyg
2012-04-05 11:03 ` Georg Bauhaus
2012-04-05 15:20 ` tonyg
2012-04-05 16:22 ` Simon Wright [this message]
2012-04-05 17:09 ` J-P. Rosen
2012-04-05 16:58 ` Pascal Obry
2012-04-05 17:14 ` Jeffrey Carter
2012-04-05 17:18 ` Pascal Obry
2012-04-05 18:30 ` Jeffrey Carter
2012-04-08 8:09 ` tonyg
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox