Using the Windows operating system will sometimes encounter this error message: "0X ???????? instruction 0x00000000 referenced memory, the memory can not be written\If they go to some "master" and got an answer often is "Windows is so unstable," like the indignation and scorn. In fact, this error is not necessarily a Windows instability. In this paper, to a simple analysis of the common causes of this error.
1, the application did not check the memory allocation failure
program requires a memory to save data, you need to call the operating system's "performance function" to apply, if the memory allocation successful, the function will be opened by the new address of the memory area returned to the application, the application Through this address you can use this memory. This is the "dynamic memory allocation\
memory are not always call at any instant, inexhaustible, and sometimes memory allocation will fail. When the allocation fails, the system function will return a 0 value, then returns the value "0" has not indicated that the newly opened pointer, but the system to the application to issue a notice in an error. As an application, in the memory after each application should check the return value is 0, if so, would mean a failure occurs, should take some measures to save, which enhance the process of "robustness".
if the application did not check the error, it will be in accordance with the "thinking inertia" that this value can be assigned a pointer to it, continue to run after the use of this memory. The real address of memory area 0 is the computer system saved the most important "interrupt descriptor table" is absolutely not allowed applications. In the absence of operating system protection mechanisms (such as DOS), to write data to this address will result in immediate crash, but the robust operating system, such as Windows, this operation will be immediately captured by the system's protection mechanisms, the result is the forcibly shut down the operating system application errors, in order to prevent the expansion of its error. At this time, there will be above the "write memory" error, and that the referenced memory address "0x00000000".
memory allocation failure causes of the many, not enough memory, the system does not match the version of the function and so may be affected. Therefore, this allocation failure more common in the operating system to use for a long time, the installation of a variety of applications (including accidentally "installed" in the virus program), change the number of system parameters and system document.
Second, the application itself BUG quoted as abnormal memory pointer
using dynamic allocation of applications, sometimes there is such a situation: trying to write a program "should be available" in memory, but I do not know why, it is expected that the available indicators has expired. There may be "forgotten" to the operating system requirements allocation process itself may also be written off at some point have this memory and "no attention" and so on. Memory to be written off the system recovery, the access is no longer the application, so read and write operations, will also trigger the system protection mechanisms in an attempt to "illegal" process only end is to be terminated operations running, recycling all resources . Computerworld legal or much more severe than in humans and ah!
situations like this are part of the program itself BUG, you can often operate in a specific order to reproduce the error. Invalid pointer is not always 0, so errors in the memory address is not necessarily as "0x00000000\
If the system has been mentioned frequently error, the following suggestions may be helpful:
1. View the system if there are trojans or viruses. Such procedures are often responsible for control systems to modify the system, causing the operating system exception. Normally should strengthen information security awareness, executable programs from unknown sources, no curiosity.
2. Update the OS re-installation program copies the correct version of system files, modified system parameters. Sometimes the operating system itself will also have BUG, pay attention to install the official release of the upgrade process.
3. try the new version of the application.
没有评论:
发表评论