Common Causes of Memory Errors in Windows

Source: Internet
Author: User

In Windows, users may encounter the following error message: "0X ???????? Instruction reference 0x00000000 memory, the memory cannot be written ", and then the application is disabled. If you ask some "experts", the answer is often "Windows is so unstable" and so on. In fact, this error is not necessarily caused by Windows instability. This article briefly analyzes the common causes of such errors.

1. failed to check memory allocation by Application

When a program needs a piece of memory to store data, it needs to call the "function" provided by the operating system to apply. If the memory is allocated successfully, the function will return the newly opened memory zone address to the application, and the application can use this memory address. This is "dynamic memory allocation", and the memory address is also the "Pointer" in programming ".

The memory is not always used, and sometimes the memory allocation fails. When the allocation fails, the system function returns a value of 0. The returned value "0" does not indicate a newly enabled pointer. Instead, it notifies the application of an error. As an application, check whether the returned value is 0 after each memory application. If yes, it means that a fault has occurred and some measures should be taken to save the problem, this enhances the robustness of the program ".

If the application does not check this error, it will regard this value as an available pointer to it according to "thinking inertia" and continue to use this memory in subsequent operations. The real 0-address memory zone stores the most important "Interrupt Descriptor Table" in computer systems and is definitely not allowed to be used by applications. In an operating system without a protection mechanism (such as DOS), writing data to this address will immediately crash, while in a robust operating system, such as Windows, this operation will be immediately captured by the system's protection mechanism. The result is that the operating system forces the application that fails to be closed to prevent the error from expanding. At this time, the above "write memory" error will occur, and the referenced memory address is "0x00000000 ".

There are many causes of memory allocation failure, such as insufficient memory and mismatched system function versions. Therefore, this allocation failure is often seen after the operating system has been in use for a long time, installed a variety of applications (including inadvertently "installed" virus programs ), after a large number of system parameters and system files are changed.

2. Applications reference abnormal memory pointers due to their own bugs

In applications that use dynamic allocation, sometimes the program tries to read and write a piece of memory that should be available, but somehow, the expected available pointer has expired. It may be that the system requires allocation "forgot", or that the program has logged out the memory at some time and "did not pay attention. The logged-out memory is reclaimed by the system and its access rights do not belong to this application. Therefore, read/write operations also trigger the system's protection mechanism, the only end of a program that attempts to "break the law" is that it is terminated and all resources are recycled. Laws in the computer world are much more effective and harsh than humans!

Such cases all belong to the bugs of the program. You can often reproduce errors in a specific operation order. Invalid pointers are not always 0, so the memory address in the error prompt is not set to "0x00000000", but other random numbers.

The following suggestions may be helpful if the system frequently mentions error prompts:

1. check whether a trojan or virus exists in the system. Such programs tend to modify the system irresponsibly to control the system, resulting in operating system exceptions. In general, information security awareness should be strengthened, and the executable procedures with unknown sources should never be curious.

2. Update the operating system so that the operating system installer can copy the correct version of the system file and correct system parameters. Sometimes the operating system itself also has bugs. You must install the officially released upgrade program.

3. Try the new version of the application.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.