How many Timers Can I Create???
Alex
kbyte at iol.pt
Mon Apr 12 16:27:16 UTC 2004
Ok, but I am still looking to this behaiviour as strange, because the pc I am using has 256 MB of ram and if the rtems see memory as a flat fashion, It looks like that rtems is waisting memory in timers... Sorry about my statement ... I am beginner in rtems, but now I am interesting in find out the reason... I think we all!
So if with 256 mb rtems only allows to create 10 timers, well If we need 20 timers We have to put ~512 Mb on the PC. It looks very strange...
Alex
----- Mensagem Original -----
De: Joel Sherrill <joel.sherrill at OARcorp.com>
Data: Segunda-Feira, 12 de Abril de 2004, 17:18
Assunto: Re: How many Timers Can I Create???
> Kamen Penev wrote:
>
> > Joel Sherrill wrote:
> >
> >> Alex wrote:
> >>
> >>> Hi,
> >>>
> >>> Does RTEMS has a confifured maximum number o timers it
> supports, or
> >>> it naturally crashs when too much timers are created?
> >>>
> >>> In an test I am doing I have the following:
> >>>
> >>> #define CONFIGURE_MAXIMUM_POSIX_TIMERS 150
> >>> #define CONFIGURE_MAXIMUM_ 150
> >>>
> >>> Then I have source code to create 100 timers, but when the
> program
> >>> starts it hangs, even before starting sreating the first
> timer. The
> >>> timers are created with the timer_create POSIX function.
> >>
> >>
> >>
> >> Sounds like the BSP was unable to assign the memory for that much
> >> workspace.
> >
> >
> >
> > I see this in confdefs.h (ss-20030417):
> >
> > #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
> > ((_timers) * \
> > ( 0 ) )
> >
> > Maybe this is why?
>
> That would explain it also. :)
>
> I would guess that the proper definitions in
> cpukit/sapi/include/confdefs.h should be:
>
> #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
> ((_timers) * sizeof(POSIX_Timer_Control))
>
> And since POSIX timers implicitly use a Classic API timer:
>
> #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
> ((_timers + CONFIGURE_MAXIMUM_POSIX_TIMERS) * \
> ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
>
> My earlier statement about the bspstart.c failing still
> apply. But this time you probably got slightly further
> in initialization before things failed. RTEMS initialization
> probably ran out of workspace duging the preallocation of
> object control blocks.
>
> If this works, let us know so a PR can be filed.
>
> > Kamen
> >
>
>
>
___________________________________________________________________________________________
IOL Flash. A net normal em versao acelerada.
Promocao: Ligue-se a Internet pelo IOL Flash e ganhe um Vale de 10 da Galp!
Saiba como: http://www.iol.pt/central_utilizador/iol_flash/promocao.php
More information about the users
mailing list