@MikeyBoy
I did, and it crashes when I try and initialise my block of memory.
Here:
1 2 3 4 5
|
for (int i = 0; i < 4096; i++) {
mainMemory[i] = 0;
cout << i << endl;
}
|
But with the array size of 4096, it does not crash immediately. It reaches i=1928 and then crash. With other numbers it crashes immediately.
The crash report from Windows reads the following:
Problem signature:
Problem Event Name: APPCRASH
Application Name: CacheCoursework.exe
Application Version: 0.0.0.0
Application Timestamp: 512e2678
Fault Module Name: CacheCoursework.exe
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 512e2678
Exception Code: c0000005
Exception Offset: 000017ca
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 2057
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
I searched for "Exception Code: c0000005" and it seems to be that my program is trying to reference memory that is not there.
But I don't understand why it does that, because that is the only dynamic memory allocation that my program does (and it is not that big, I have 8 GB of RAM in this machine)