I\'m working on a cross platform profiling suite, and would like to add information about the machine\'s CPU (architecture/clock speed/cores) and RAM(total) to the report of
The CPU is easy. Use the cpuid instruction. I'll leave other posters to find a portable way to determine how much RAM a system has. :-)
cpuid
For Linux-specific methods, you can access /proc/meminfo (and /proc/cpuinfo, if you can't be bothered to parse cpuid responses).
/proc/meminfo
/proc/cpuinfo