下载

Technical Note 1106: Memory Management Guide
1106
Memory Management Guide
Revison: 3.1
Last Date Modified: 04-October-2002
This Technical Support Guide is intended to help you understand and prevent ‘Out
of Memory’ errors in MATLAB.
Memory Overview
1.
How does an operating system manage memory?
2. How do I set the swap space for my operating system?
MATLAB and Memory
3.
Why do I get ‘Out of Memory’ errors in MATLAB?
4. How do I avoid 'Out of Memory' errors in MATLAB?
5. How do I defragment the MATLAB workspace memory?
Section 1: How does an operating system manage memory?
A computer’s memory must accommodate both the Operating System’s
processes and user processes. The following outline describes what happens
when a user starts a program such as MATLAB.
1. User starts the program.
2. The operating system creates an address space for the program to run in,
which involves setting up approprate page tables.
3. The program's text and data segments are mapped from the executable file
on disk to the virtual address space, the former being mapped as read-only,
http://www.mathworks.com/support/tech-notes/1100/1106.shtml (1 of 9) [10/16/2002 12:57:27 AM]