Classwork 27

Logistics

  • Due: Wednesday, November 29th AoE.
  • Submission instructions: make sure that the required files are in your csci112_fall2023/classwork/week14/wed/ directory.
  • Deadline reminder: after the deadline passes, you cannot earn any points for this assignment.

Learning outcomes

  • Use valgrind to find memory errors and leaks

Assignment

  • Log in to the server.
  • From your home directory, navigate to csci112_fall2023/classwork/week14/wed/, creating directories week14 and wed if necessary.
  • Copy the file mem.exe from the /public/classwork/week14/wed/ directory into your directory.

This assignment will be graded by hand.

Run mem.exe with valgrind. In a new file called mem.txt in your csci112_fall2023/classwork/week14/wed/ directory, answer the following questions:

  1. How many memory errors are there?
  2. How many memory leaks are there?
  3. Describe the memory errors. What sort of thing do you think caused them? How do you know?

Grading turnaround

Scores will be uploaded to D2L by the next class period.