patterns-discussion AT lists.siebelschool.illinois.edu
Subject: General talk about software patterns
List archive
Re: [patterns-discussion] Using Design Patterns without dynamic memory allocation
Chronological Thread
- From: Russ Rufer <russ AT pentad.com>
- To: Ralph Malph <ralph_malph AT yahoo.com>
- Cc: patterns-discussion AT cs.uiuc.edu
- Subject: Re: [patterns-discussion] Using Design Patterns without dynamic memory allocation
- Date: Tue, 29 Mar 2005 10:45:17 -0800
- List-archive: <http://mail.cs.uiuc.edu/pipermail/patterns-discussion>
- List-id: General talk about software patterns <patterns-discussion.cs.uiuc.edu>
- Organization: Pentad Software Corporation
You're bringing back some good memories, Ralph--thanks! Most of the GoF patterns (as exemplified) introduce flexibility through polymorphism. Depending on your system, you may be able to take advantage of polymorphism, even if you don't allocate memory dynamically. You might be able to construct all your polymorphic objects at initialization time, perhaps using pools of reusable objects, or, assuming C++, take advantage of placement new. Using virtual methods, you'll take a small (but predictable) time hit going through the v-table, and add ram for the v-table pointer itself, but these might be quite a bit more acceptable than dynamic memory allocation.
Here's an introductory article you might find useful:
Effective C++ Memory Allocation
by Aaron Dailey
http://www.embedded.com/1999/9901/9901feat2.htm
If you think this is a profitable direction for you to explore, let me know and I'll try to remember the sources that helped me when I was learning this stuff (but I suspect others on the list will have more current suggestions than mine).
- Russ
Ralph Malph wrote:
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
patterns-discussion AT cs.uiuc.edu
http://mail.cs.uiuc.edu/mailman/listinfo/patterns-discussion
- [patterns-discussion] Using Design Patterns without dynamic memory allocation, Ralph Malph, 03/28/2005
- Message not available
- Re: [patterns-discussion] Using Design Patterns without dynamic memory allocation, Linda Rising, 03/28/2005
- RE: [patterns-discussion] Using Design Patterns without dynamic memoryallocation, Kencho san, 03/29/2005
- Re: [patterns-discussion] Using Design Patterns without dynamic memoryallocation, Michael J. Pont, 03/29/2005
- Re: [patterns-discussion] Using Design Patterns without dynamic memory allocation, Russ Rufer, 03/29/2005
- Message not available
Archive powered by MHonArc 2.6.16.