Olin Lathrop wrote: >>> I hope you don't mind if I disagree with your implication that SMA >>> can replace DMA in all situations. >> >> I'm not Gerhard, but I'm pretty sure he never said that. Olin, here are the relevant parts. Read them again. Vitaliy said: >> I want to reiterate the fact that in some situations using SMA is not >> a viable option, so in those situations talking about its merits is >> completely pointless. Gerhard said: > In the same condescending tone you're using sometimes I could respond > here that you probably just don't see how it could be done with static > memory, but I thought carefully about this and decided not to say it. Now, tell me that the sentence above does not imply that Gerhard knows how to replace DA with SA in every situation (which I don't, due to my inexperience). > Vitaliy, you never explained how you can make heap usage predictable. Of > course I don't mind if you disagree -- as I see it, this is your problem > not mine --, but thing is that as long as you just say "believe me" > without presenting any further explanation, I for one won't believe you > and take the lack of further explanation for an absence of good > arguments :) Gerhard, who is really being condescending, you or me? I don't recall the last time I questioned your experience. Have you read Terry's reply? I don't have much to add to it, except that if dynamic allocation was 1/10 as evil as you and Olin make it out to be your computer would not get past the booting phase, and your router would crash every five minutes. The reason I replied in the first place, is because everybody was advising Quintin against using dynamically allocated memory. I thought the dangers were overblown, and while one must be cautious it is definitely possible to use DMA (sorry Olin) successfully on PICs. It all depends on the application. And I still stand by my assertion that there are situations where SMA is simply not practical, therefore in those cases discussing the evil attributes of DMA is pointless (it is the only option). > My point is that there are some applications where the lack of > predictability is more, sometimes much more, important than any possible > gain in better program structure through using the heap during normal > operation. Sometimes to the point of prohibiting heap usage during > normal operation. And that when using the heap, one should be aware of > this. I hope you're having lots of fun fighting the straw man. > This may not apply to any of the applications you ever worked on, > but if it should be so, this doesn't mean that these applications don't > exist or even that they are rare. Again you imply that I said something I didn't. But please, humor me, and give me a list of these critical applications (from your vast repertoir of product lines) where using the heap is "prohibiting". Vitaliy -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist