Main memory is a temporary storage that holds both programs and data while they are being used by the processor. It is made up of Dynamic Random Access Memory (DRAM) chips and is organized as a linear array of bytes, each with a unique address starting from zero.
Machine instructions and data items in C programs can vary in size: for instance, on an IA32 machine running Linux, a short
takes two bytes, int
, float
, and long
each take four bytes, and double
takes eight bytes.