On Tue, Oct 6, 2009 at 3:24 PM, Isaac Marino Bavaresco < isaacbavaresco@yahoo.com.br> wrote: > Indeed, your heap must be declared as a normal variable (big array of > char) so the compiler and linker locate it properly. If you just use an > address range you *think* is not in use then next time you link it, it > may be on top of some other variable. > I think it is more common to declare a chunk of memory in linker script so that area will not be used by the linker therefore free to use. With a variable it could happen that the compiler thinks that it was not used and then the optimization chops it off... BTW: I think what Olin is trying to express is that a dynamic memory allocator needs an overhead plus some trouble with the memory fragmentation so overall it is not the best choice for a small device. Tamas > > Then your allocator "cuts" chunks of it and gives to your application > (return the chunk address). > > See the sink I posted in my previous reply, it is exactly what you need, > and very well tested. If you need help to get started just send me a > message. > > Best regards, > > Isaac > > __________________________________________________ > Fa=E7a liga=E7=F5es para outros computadores com o novo Yahoo! Messenger > http://br.beta.messenger.yahoo.com/ > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- = http://www.mcuhobby.com -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist