Inside the Mars Curiosity Rover is basically an Apple G3 (PowerPC) computer with 256MB of DRAM, and 2GB of flash storage (see ExtremeTech for details). Note that this cpu is about 1/4 the speed of an iPhone half the RAM (512MB) and much less than the 64GB of storage memory. Oh, and the software? Some of it is available on the NASA GitHub.
For a comparison of the size of this most recent rover, take a look at the photo below showing it’s size next to the previous two Mars rovers.