Thanks for the bug report, Gerome.
Did you compile it with the included PPJ? If you didn't there might be a problem in the link step.
Another possibility might be to add some fluff to pad it out to at least 4K. Vortex posted some info that suggests that newer Win systems simply cannot survive without a bit of waste.
If that's not it and if you are willing to risk subjecting your computer to another round of abuse :-) here's the exe as it should compile.
(See attached.)
Hi,
Sure if it worked... i really love the Access Violation under my XP SP1
Let me show you what I see. This is at the end of the test.
3397 found 2 times
3132 found 2 times
9000 found 2 times
7006 found 2 times
9366 found 2 times
3239 found 2 times
2440 found 2 times
1653 found 2 times
3290 found 2 times
2976 found 2 times
3801 found 2 times
4910 found 2 times
8470 found 2 times
3209 found 2 times
8099 found 2 times
2107 found 2 times
9817 found 2 times
9610 found 2 times
3661 found 2 times
Note: 1/e = 0.3678794412. (Compare to..)
Total number of numbers repeated is: 3652
Max number of times any number repeated is: 7
Done..
The previous run was 10,000 numbers, 3679 repeats with 7 max hits on any single number.
There are three issues here and we can separate them if we want to.
One is the algorithm (which I'm sure you can understand even without the tester). Another is the test code itself. You'd just be helping me out personally if that is where the bug is. And the third is the direction Bill Gates is herding us. (And I don't like it.)
Anyway...
It's not the load point. (Should load at 0x400000)
It's not the function calls (though it could be the lib version linked).
It's not illegal instructions or you'd have noticed a lot of this in other programs too.
And it is a fun demo. :-)
.