Instructions for Exercise
This lesson demonstrates how you can run the file provided in the exercise in the next lesson.
We'll cover the following...
In this exercise, you’ll be investigating swap performance with a simple
program found in mem.c
. The program is really simple: it just allocates an
array of integers of a certain size, and then proceeds to loop through it
(repeatedly), incrementing each value in the array.
all: mem mem: mem.c gcc -o mem mem.c -Wall -O
Press the RUN
button to open a terminal through which you can interact with the code.
Once the terminal is launched, type make
to build it (and look at the file Makefile
for details about how
the build works).
Then, type ./mem
followed by a number to run it. The number is the size (in
MB) of the array. Thus, to run with a small array (size 1 MB): ...