Just declare cpu_info as int[4] and it should run.
Basically on x86 CPUs you can use the cpuid instruction to get information about the CPU and the cache: http://www.sandpile.org/x86/cpuid.htm
The code in the first snippet uses a compiler intrinsic to execute this instruction and calculates the cache size from the result. In the second snippet the assembler code is written by hand instead.