[M3devel] Calling RTHeapStats.ReportReachable(); with Pthread cvs head

Daniel Alejandro Benavides D. dabenavidesd at yahoo.es
Tue Oct 30 07:24:28 CET 2007


Hi:
About this last changes, the runtime can not properly
feed shownew, with a @M3shownew=shownew.
The program 'a' is just not started as it seems here,
altough the window (shownew) does appear, start
doesn't respond, and it stays there until aborted.

Thanks

--- "Daniel Alejandro Benavides D."
<dabenavidesd at yahoo.es> escribió:

> Hi:
> Yes it's working very well. I'm sorry for the delay.
> Thanks.
> --- Tony Hosking <hosking at cs.purdue.edu> escribió:
> 
> > Please try the latest CVS head.
> > 
> > On Oct 21, 2007, at 6:03 PM, Daniel Alejandro
> > Benavides D. wrote:
> > 
> > > Hi:
> > > Im trying to execute the following program with
> > the Pthread cvs  
> > > head implementation and I got this when
> executing
> > the program:
> > >
> > > danielb at danielb-desktop:~/as207/code/m3gdb$
> > LINUXLIBC6/Main
> > > Entre dos enteros6 7
> > > Estadisticas del Heap
> > > HEAP: 0xb73d2000 .. 0xb7412000 => 0.2 Mbytes
> > >
> > >
> > > ***
> > > *** runtime error:
> > > ***    <*ASSERT*> failed.
> > > ***    file
> > "../src/thread/PTHREAD/ThreadPThread.m3", line 992
> > > ***
> > >
> > > Aborted
> > > danielb at danielb-desktop:~/as207/code/m3gdb$
> > >
> > > The assert violated in
> > m3core/thread/PTHREAD/ThreadPthread.m3 is this:
> > > PROCEDURE ProcessOther (act: Activation;  p:
> > PROCEDURE (start,  
> > > stop: ADDRESS)) =
> > >   (* LL=activeMu *)
> > >   VAR
> > >     sp: ADDRESS;
> > >     state: RTMachine.ThreadState;
> > >   BEGIN
> > >     <*ASSERT act.state = ActState.Stopped*>
> > >
> > >
> > > The source code of the little program is this:
> > >
> > > MODULE Main;
> > >
> > > IMPORT SIO;
> > > IMPORT RTHeapStats;
> > > IMPORT RTutils;
> > > IMPORT RTHeapDebug;
> > > VAR
> > > varA, varB, varC: INTEGER;
> > >
> > >
> > > PROCEDURE multiplicar(a,b: INTEGER): INTEGER=
> > >         VAR
> > >           varC: INTEGER;
> > > BEGIN
> > >         varC:=a*b;
> > >         RETURN varC;
> > > END multiplicar;
> > >
> > >
> > > BEGIN
> > >
> > >         SIO.PutText("Entre dos enteros");
> > >         varA:=SIO.GetInt();
> > >         varB:=SIO.GetInt();
> > >         varC:=multiplicar(varA,varB);
> > >         SIO.PutText("Estadisticas del Heap");
> > >         RTHeapDebug.CheckHeap();
> > >    RTHeapStats.ReportReachable();
> > > (*      RTutils.Heap 
> > >
> >
>
(FALSE,RTutils.HeapPresentation.ByTypecode,TRUE,LAST(CARDINAL));*)
> > >         SIO.PutInt(varC);
> > >
> > > END Main.
> > >
> > > According to the draft book of Michael Dagenais
> > Building  
> > > Distributed OO Applications:   Modula-3 Objects
> at
> > Work,  
> > > RTHeapStats.ReportReachable()
> > > " ... is called to determine the number
> > > of active, reachable, objects (i.e. those which
> > would not be
> > > garbage collected). Of the 1980 objects on the
> > heap, only slightly  
> > > more than half are still alive."
> > >
> > > According to the interface documentation:
> > >  "reports the number of reachable objects and
> > bytes from each  
> > > compilation unit, thread stack, and the
> individual
> > roots that reach  
> > > the most bytes. The report is written to stderr.
> > The Modula-3  
> > > process is frozen during the scanning and
> > reporting."
> > >
> > > Obviously with the previous version of pthread
> the
> > things were  
> > > working fine, also with user level
> implementation
> > >
> > > Thanks,
> > >
> > > Daniel Benavides
> > >
> > >
> > > Sé un Mejor Amante del Cine
> > > ¿Quieres saber cómo? ¡Deja que otras personas te
> > ayuden! .
> > 
> > 
> 
> 
> 
>        
>
____________________________________________________________________________________
> Sé un Mejor Amante del Cine                         
> ¿Quieres saber cómo? ¡Deja que otras personas te
> ayuden!
>
http://advision.webevents.yahoo.com/reto/entretenimiento.html
> 



       
______________________________________________ 
Pregunta, Responde, Descubre. 
Comparte tus consejos y opiniones con los usuarios de Yahoo! Respuestas 
http://es.answers.yahoo.com/info/welcome



More information about the M3devel mailing list