High-Level and Process Patterns from the Memory Preservation SocietyBy: J. Noble, C. Weir
Published in: PLoPD4
Pages: 221-238
Patterns for memory-challenged systems.
Category: Memory Management
Summary: Patterns for memory-challenged systems.
Pages: 225-228
You're developing a small system with stringent memory requirements. Imagine the system even smaller than it really is. Develop a culture where saving memory is a habit. Use design and code reviews to exorcise wasteful features and techniques. Use Captain Oates, Exhaustion Test, Make the User Worry, Memory Budget, Memory Performance Assessment, and Partial Failure
Pages: 228-229
You're using Think Small. Draw up a memory budget and worry about it a lot. Define targets for the system and for each component. Targets increase the predictability of the memory use. Developers with targets can make local decisions where it's easy to identify problem areas.
Pages: 229-230
You're using Memory Budget, but memory requirements are unpredictable. As development proceeds, it's clear that some will need more than their budgeted memory allotment. Include overdraft provisions in the budget.
Pages: 230-232
You're using Memory Budget, but it's difficult to predict memory requirements. A lot depends on the user. Make the memory model explicit in the user interface so that the user can worry about memory.
Pages: 232-233
No matter how well you reduce the program's memory requirements, there will always be situations when the program runs out of resources. To handle unlimited memory requests, allow the program to fail partially or have behavior degrade, but not stop. Use Exhaustion Test
Pages: 234-235
To prioritize memory demands, when a system runs out of memory, surrender memory used by less vital components rather than have the most important tasks fail.
Pages: 235-236
To be sure the program will work correctly when out of memory, use testing that simulates memory exhaustion. Verify that the program uses Partial Failure or Make the User Worry
Category: Memory Management, Testing
Pages: 237-238
To stop memory constraints from dominating the design process, implement the system, paying attention to memory requirements only where these have a significant effect on the design. Once the system is working, identify the most wasteful areas and optimize their use.
Category: Design Process, Memory Management