Tránh các vấn đề về thiếu bộ nhớ


When your computer doesn't have enough memory for all of the actions it's trying to perform, Windows and your programs can stop working. To help prevent information loss, Windows will notify you when your computer is low on memory. You can also learn to recognize the signs of low memory and take steps to prevent the problem.

What are the signs of low memory?

Signs of low memory include poor performance, low-memory or out-of-memory notifications, and display problems. For example, if you try to open a menu in a program when your computer is low on memory, the program might respond slowly or appear to stop responding. If the menu appears, it might not respond when you try to click an item or it might not display all items. If you click a menu item, the menu might also disappear and leave a blank area on the screen instead of displaying the contents of the document or file you're working in.

Why do low memory problems occur?

Your computer has two types of memory, random access memory (RAM) and virtual memory. All programs use RAM, but when there isn't enough RAM for the program you're trying to run, Windows temporarily moves information that would normally be stored in RAM to a file on your hard disk called a paging file. The amount of information temporarily stored in a paging file is also referred to as virtual memory. Using virtual memory—in other words, moving information to and from the paging file—frees up enough RAM for programs to run correctly.

Low memory problems occur when your computer runs out of RAM and becomes low on virtual memory. This can happen when you run more programs than the RAM installed on the computer is designed to support. Low memory problems can also occur when a program doesn't free up memory that it no longer needs. This problem is called memory overuse or a memory leak.

How to prevent low memory problems

Running fewer programs at one time can help prevent low memory problems and information loss. It's a good idea to observe which programs show signs of low memory conditions and try not to run them at the same time.

However, it’s not always convenient or practical to run a limited number of programs. Signs of low memory can indicate that the computer needs more RAM to support the programs you use. Here are the recommended ways to solve or prevent low memory problems:

  • Increase the paging file (virtual memory) size

    Windows automatically attempts to increase the paging file size the first time your computer becomes low on memory, but you can also manually increase it up to a maximum size that is determined by the amount of RAM installed. Although increasing the paging file size can help prevent low memory problems, it can also make your programs run more slowly. Because your computer reads information from RAM much faster than from a hard disk (where the paging file is), making too much virtual memory available to programs will slow them down.

    For more information, see Change the size of virtual memory.

  • Install more RAM

    If you see signs of low memory, or if Windows warns you about a low memory problem, check the information that came with your computer or contact the computer manufacturer to determine which type of RAM is compatible with your computer, and then install more RAM. To install RAM, check the information provided by the manufacturer.

    For more information, see Find out how much RAM your computer has.

  • Determine if a program overuses memory

    If the computer becomes low on memory whenever you run certain programs, one or more of those programs might have a memory leak. To stop a memory leak, you need to close the program. To repair a memory leak, you need to check for updates for the program or contact the publisher of the software.

    To determine which program is using the most memory, follow these steps:

    1. Open Task Manager by right-clicking the taskbar, and then clicking Start Task Manager.

    2. Click the Processes tab.

    3. To sort programs by memory usage, click Memory (Private Working Set).

    You can also check for program errors and troubleshooting information using Event Viewer.

    1. Open Event Viewer by clicking the Start button Picture of the Start button, clicking Control Panel, clicking System and Security, clicking Administrative Tools, and then double-clicking Event Viewer. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

    2. In the left pane, click Applications and Services Logs to view error events. To see a description of the problem, double-click the event. To see if troubleshooting information is available, look for a link to online Help.

    For more information, see What information appears in event logs (Event Viewer)?