Olin Lathrop escreveu: > Vitaliy wrote: > = >> Say you allocate a static buffer to hold data that you receive over >> UART. >> = > > That sounds like big system thinking. Most of the time you don't need to > store a buffer full of input data to process it. Eventually deep down > somewhere it will likely be processed a byte at a time. You might as well > design your system to process the incoming data as a byte stream in the > first place. > = Sometimes I do. I have a product (PIC16F648A) that uses packets in lengths multiple of 16 bytes and are encrypted using AES, serialized and CRCed. My application supports packets up to 80 bytes long, but most are usually up to 64 bytes long. It is not possible to process the 16-byte data blocks in a packet without having them all available at once. In this product particularly I didn't use dynamic allocation. 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