I made this program to try to crash my computer by making it run out of RAM, but something else happened. It made my single core CPU go to 100% according to task manager. I tried this on my C2D computer, and it made the CPU go to 50%. Then I opened 2 at once on my C2D machine and it made the CPU usage go to 100%. So I believe you just have to open one of these per core to get 100% usage. I think that this simple program would be great for a CPU stress test.
#include <iostream>
using namespace std;
int main ()
{
int * p;
while (p == p){
(*p++)+1;
}
}
#include <iostream>
using namespace std;
int main ()
{
int * p;
while (p == p){
(*p++)+1;
}
}