On Thu, Oct 8, 2009 at 2:10 AM, Isaac Marino Bavaresco < isaacbavaresco@yahoo.com.br> wrote: > Sometimes it is just not possible to predetermine how many of what > structures you are going to need in every scenario. With unions of > overlapped structures you must have this knowledge at design time. > Is not what overlaid memory is for? You do not need to know where the memory is getting placed by the linker and you do not need to define unions and such. However, if there is not enough space then it turns out at compile/linking time instead of during heavy testing or bug-reports from clients. > > If there is not enough memory, then your application would fail anyway. > One must be careful enough to make the application recover gracefully > from such failure. > Exactly. You need to know how much memory your application is going to use in worse scenario anyway. The matter of fact it is harder to predict or calculate it with dynamic memory handling as there are some other factors like the fragmentation, memory leaks and other memory unbalancing problems. In addition to this buffer overflow problems can also corrupt the memory mapping structure which elevates the problem to a big and hardly recoverable problem. Tamas > > > 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