It's worth noting that there are a couple of different ways to accomplish
"dynamic" memory.  malloc()/free() are generally provided by libc
(technically, they must be provided).  You can also write your own version
of malloc which statically allocates a heap and returns pointers into that;
this is good if you want a particular allocation strategy or to control how
much memory to put into the heap-- I don't think the msp430 libc malloc
checks if you're stamping on the stack.

I believe the tinyos party line on dynamic memory is that it should be
encapsulated inside a component.  For instance, if you only want to allocate
one (or a small number) of kinds of objects, PoolC is convenient.

Steve

On Mon, Feb 9, 2009 at 8:18 AM, Andrey Gursky <[email protected]>wrote:

> Antonio,
>
> as I'm using motes based on AVR microcontrollers, the reference for them
> is:
>
> http://www.nongnu.org/avr-libc/user-manual/group__avr__stdlib.html#g4996af830ebe744d9678e5251dfd3ebd
>
> The blip project for T2
> ($TOS_ROOT/support/sdk/c/blip/lib6lowpan/ip_malloc.c) uses malloc and it
>  works for me on AVR and must work on MSP430 (telosb). So it could be
> good example to go on.
>
> Bets wishes,
> Andrey
>
>
> Antonio Guerrieri wrote:
> > Thanks a lot.
> > Reading the web page I realized what I need is not Safe_TinyOS but a way
> to
> > do dynamic allocation.
> > Could you help me?
> > Is right using the standard C dynamic memory allocation?
> >
> > Regards,
> > Antonio Guerrieri
> >
> >
> >
> > Andrey Gursky wrote:
> >
> >> Antonio,
> >>
> >> the start is here:
> >> http://docs.tinyos.net/index.php/Safe_TinyOS
> >>
> >> Best wishes,
> >> Andrey
> >>
> >>
> >>
> >> Antonio Guerrieri wrote:
> >>> Hi All,
> >>> I'm going to use dynamic memory allocation in TinyOS. I'm using Telosb.
> >>>
> >>> Reading on the Internet, I'm understanding it is possible to use
> dynamic
> >>> allocation in safe mode in TinyOS 2.1
> >>> Can you give me some information on the use of this feature?
> >>> Could you send me some links where I can read something about dynamic
> >>> allocation in TinyOS?
> >>>
> >>> Please, help me!
> >>>
> >>> Best Regards.
> >>>
> >>> Antonio Guerrieri.
> >>>
> >>>
> >
> >
> >
> >
> >  --
> >  Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e
> SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
> >
> >  Sponsor:
> >  Meetic: il leader italiano ed europeo per trovare l'anima gemella
> online. Provalo ora
> >  Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8291&d=9-2
> >
> >
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to