From: Rod Kay <rod.kay@aulace.com>
Subject: Re: Problem where a function is invoked once but called twice (when invocation is within an allocator).
Date: Thu, 5 May 2011 03:59:12 -0700 (PDT)
Date: 2011-05-05T03:59:12-07:00 [thread overview]
Message-ID: <fa0604a1-4830-4393-8432-c5cc097695ff@s16g2000prf.googlegroups.com> (raw)
In-Reply-To: op.vuz1j0pjule2fv@douda-yannick
On May 5, 6:22 pm, Yannick Duchêne (Hibou57)
<yannick_duch...@yahoo.fr> wrote:
>
> Rod, may be you should have a look at the produced assembly ? and post an
> excerpt here
A good idea.
I created a small test program ...
with media.Video;
with openGL;
procedure Tester
is
the_Movie : media.Video.view := media.Video.new_Video ("xyz.avi");
Case_1 : openGL.Image := the_Movie.next_Frame;
Case_2 : access openGL.Image := new
opengl.Image' (the_Movie.next_Frame);
begin
null;
end;
... and generated the mixed ada/asm, which is here:
http://109.74.196.91:8080/doubled_next_Frame_call_results.txt
In brief, the mixed ada/asm shows next_Frame being called twice for
Case_2 ...
**** Case_2 : access openGL.Image := new
opengl.Image' (the_Movie.next_Frame);
...
call media__video__next_frame
...
call __gnat_malloc
...
call media__video__next_frame
...
call memcpy
Hope this helps.
regards.
next prev parent reply other threads:[~2011-05-05 10:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 3:52 Problem where a function is invoked once but called twice (when invocation is within an allocator) Rod Kay
2011-05-05 5:43 ` J-P. Rosen
2011-05-05 6:12 ` Rod Kay
2011-05-05 8:22 ` Yannick Duchêne (Hibou57)
2011-05-05 10:59 ` Rod Kay [this message]
2011-05-05 17:07 ` Florian Weimer
2011-05-06 0:49 ` Rod Kay
2011-05-06 23:41 ` Anh Vo
2011-05-07 1:38 ` Rod Kay
2011-05-07 9:06 ` Georg Bauhaus
2011-05-07 9:45 ` Rod Kay
2011-05-09 16:01 ` Anh Vo
2011-05-09 23:00 ` Dan
2011-05-10 0:14 ` Anh Vo
2011-05-10 0:24 ` Rod Kay
2011-05-10 0:55 ` Anh Vo
2011-05-11 17:23 ` Dan
2011-05-12 22:35 ` Rod Kay
2011-05-13 17:40 ` Ludovic Brenta
2011-05-10 0:21 ` Rod Kay
-- strict thread matches above, loose matches on Subject: below --
2011-05-14 0:27 Rod Kay
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox