I am trying to 0write the RAM on an 8Gb Windows 7 64-bit machine.
int main(int argc, char *argv[])
{
for (__int64* i; ; i = new __int64(0))
continue;
return 0;
}
After it takes up roughly 2-3gigs it throws an exception: Microsoft C++ exception: std::bad_alloc at memory location 0x0039f634. I can tell there is still plenty of RAM in the task manager though. I have tried using Visual Studio 2010 and Qt Creator.
Thrown exception breaks in mlock.c:
void __cdecl _unlock (
int locknum
)
{
/*
* leave the critical section.
*/
LeaveCriticalSection( _locktable[locknum].lock );
}
Any ideas? I want it to write all inactive RAM with 0.
Compile as x64 not win32 in build options