I'm not sure what's your problem, but I'll try to answer.
Almost any non-creational pattern can be aplied without dynamic memory allocation, for instance the template method, state pattern, facade, adapter... all of them can make use of composition-like relationships rather than reference relationships (note that reference doesn't mean dynamic memory allocation, but usually involves it)
If your problem is about design patterns helping you avoid dynamic memory allocation (you have space for a maximum amount of objects and can't waste time or memory to store more...), I would suggest taking a look to the Object Pool pattern, which is a very clever way to reuse already existing objects instead of creating and destroying them constantly
Hope that helps
Hello all, looking at archives I'm not sure how "alive" this list is, but someone out there might be listening.
I'm interested in people's opinions as to whether design patterns would be useful if you could not dynamically allocate memory.
I am new to patterns and find them quite interesting. I am considering putting in some effort to comprehend them, but my projects at work include embedded safety-critical real-time systems, and one of the things that we do not use is dynamic memory allocation.
If anyone has an opinion as to whether I should delve into patterns for this type of software (i.e. you have considered doing them and/or done them in similar systems before) I'd be interested to hear it.
Thanks!
__________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
_______________________________________________ patterns-discussion mailing list [email protected] http://mail.cs.uiuc.edu/mailman/listinfo/patterns-discussion
_______________________________________________ patterns-discussion mailing list [email protected] http://mail.cs.uiuc.edu/mailman/listinfo/patterns-discussion
