测试代码时,KERNEL_DATA_INPAGE_ERROR BSOD不断

时间:2021-11-02 15:27:03

There's obviously a problem somewhere in my code, but I am too novice to realize what it might be.

在我的代码中某处显然存在问题,但我太新手无法意识到它可能是什么。

I've designed a simple program to calculate various cryptographic hashes of files. It seems to work great (I've even got it using multiple threads) on smaller files... but when I try to test it on a large ISO file (nearly 4GB), my computer very reliably crashes with a KERNEL_DATA_INPAGE_ERROR.

我设计了一个简单的程序来计算各种文件的加密哈希值。它似乎在较小的文件上工作得很好(我甚至使用多个线程)...但是当我尝试在大型ISO文件(接近4GB)上测试它时,我的计算机非常可靠地与KERNEL_DATA_INPAGE_ERROR崩溃。

Am I doing something rather inefficiently? It seems to me like too much memory is being used up, despite the fact that I've tried to limit the use of memory at one time... I wonder if it's my code, or if it's something wrong with my computer...

我做的事情效率低吗?在我看来,太多的内存正在被用尽,尽管事实上我曾试图限制内存的使用......我不知道这是我的代码,还是我的电脑出了问题... 。

fwiw I've got an i5 processor running 4 threads, and 4GB of ram using Windows 7 x64.

fwiw我有一个运行4个线程的i5处理器,以及使用Windows 7 x64的4GB内存。

Here's my code: http://pastebin.com/KA3KrStf

这是我的代码:http://pastebin.com/KA3KrStf

2 个解决方案

#1


1  

The problem is almost certainly not in your program. User mode code does not produce kernel faults. The problem is either in your hardware or the drivers. You should direct your search in that direction rather than investigating your code.

问题几乎肯定不在你的程序中。用户模式代码不会产生内核错误。问题出在您的硬件或驱动程序中。您应该将搜索指向该方向,而不是调查您的代码。

#2


0  

This code is ring3, so it should never BSOD your machine. I can only imagine you have bad RAM or a bad HDD, which is triggering a BSOD when you try to allocate a huge blob of memory.

这段代码是ring3,所以它永远不应该BSOD你的机器。我只能想象你有坏内存或坏硬盘,当你试图分配一大块内存时触发BSOD。

#1


1  

The problem is almost certainly not in your program. User mode code does not produce kernel faults. The problem is either in your hardware or the drivers. You should direct your search in that direction rather than investigating your code.

问题几乎肯定不在你的程序中。用户模式代码不会产生内核错误。问题出在您的硬件或驱动程序中。您应该将搜索指向该方向,而不是调查您的代码。

#2


0  

This code is ring3, so it should never BSOD your machine. I can only imagine you have bad RAM or a bad HDD, which is triggering a BSOD when you try to allocate a huge blob of memory.

这段代码是ring3,所以它永远不应该BSOD你的机器。我只能想象你有坏内存或坏硬盘,当你试图分配一大块内存时触发BSOD。