Computer Networks (CSC-364 2000S)


Assignment 3: Reusing Linked Lists

Assigned: Friday, February 18, 2000
Due: Wednesday, March 1, 2000

In this assignment, you will play the role of a maintainance programmer assigned the program of someone no longer with the company. This type of exercise gives your more experience thinking about and writing C.

Working with your colleagues' code (as assigned below), you must do two things: implement a new function and check for memory leaks. You will work with two versions of the linked list code from two sets of colleagues. (Sorry, I couldn't get mine ready in time.)

For extra credit, do the same two tasks for more groups.

You may not discuss your work with people in other groups (except to request code from those groups).

I had not yet received all of the code by the time I left. You can find all of the code that I had received at http://www.math.grin.edu/~rebelsky/Courses/CS364/2000S/Examples/HW2/. If the code you need is not there, ask the other gorup for the code. If they don't provide it to you by Tuesday, pick a group whose code is available.

New Function: Implement an in-place reverse function to reverse the list. Your method may not allocate or deallocate memory either directly or indirectly.

Memory Checking: It is likely that there are some memory leaks in the code you've received. Using the memorymap function that HP supplies along with its malloc package, determine whether your client code has possible memory leaks. An example that illustrates the output of memorymap is available in the example library. Note that once the first call to malloc has been made, some space is permanently allocated to malloc's tables.

Note that you do not need to repair any memory leaks. Just identify whether there are any and in what functions they are likely to occur. For extra credit, describe how to repair those memory leaks.

Assignments: The following list is organized by the maintainance groups who will be doing the new coding. For each maintainance group, I give the names of the previous groups whose code the maintainance group must update. If the previous group does not have code ready by Tuesday, February 29, feel free to pick an alternate previous group.

Turn in (1) the code for your different functions; (2) the code for the programs you've written to test these functions; and (3) the output of the test program.

History

Friday, February 18, 2000

Saturday, February 19, 2000

Sunday, February 20, 2000


Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS364/2000S/Assignments/assign.03.html

Source text last modified Fri Mar 3 12:09:10 2000.

This page generated on Fri Mar 3 14:06:40 2000 by Siteweaver. Validate this page's HTML.

Contact our webmaster at rebelsky@grinnell.edu