3840
Solving Memory Use Problems: Quick Answers
Exelis Visual Information Solutions receives many questions about how IDL manages memory use. Since memory is a central issue for any program, these questions are not very surprising.
This Help Article provides quick suggestions for solving memory use problems.
Please see additional Help Articles for detailed information on how IDL uses memory:
Discussion:
The following are things to check when trying to solve memory use problems.
- Check your system quotas and limits. Unix users should use their shell limit(1) command to make sure they are not being artificially limited from full use of stack or heap memory. For additional information, please see
- Determine if your system's virtual memory is configured to meet your needs. This often involves adding swapfile space to your system.
- Use IDL efficiently.
- Use array operations
- Learn how to order your operations efficiently
- Use the TEMPORARY function
- Perform loop operations in an order designed to minimize virtual memory paging
- Read the information on efficient programming in the IDL documentation.
- Add memory to the system. There is no substitute for having enough physical memory to solve a problem of a given size, and as you try to solve bigger problems, you need more memory. Adding memory is often a big win, especially since the price is almost always falling.
Once you have reduced your memory use, and optimized the use of the memory you do have, the only remaining avenue for improvement is to add memory.