Assignment 2

Find out how much memory you can allocate in a C program on one of the lab machines. Investigate if there is a difference between allocating a huge block of memory at once, or small chunks (use incremental malloc() calls that allocate a byte).

Experiment with 32bit and 64 bit platform (by using appropriate compile flags -m32, -m64).

Hand in: Email me the code so that I can test it. Bring to class a hardcopy of the code, and a report summarizing the tests that you wrote, and the conclusions that you reached.


Last modified: Tue Feb 1 16:23:47 EST 2011