tags:

views:

179

answers:

1

In windows, I want to generate random number with seed: time + memory usage. I want to get the memory usage from physical memory sytem cache the one that appears in taskmgr.
So, How to get physical memory system cache in c (windows and not .net )? The random seed may end up something like this:

srand((unsigned int)(time(0)+ memSystemCache) );

This is probably get the memory usage from compile-time , it's ok for me. Is it possible?
Tnx in advance.

+1  A: 

Since your using Win32 I would recommend CryptGenRandom over srand/rand.

Shane Powell