lecture 21 -- memory manager code walkthru we looked at fred's sample code in files/memmgr.c. simple, procedural (non-object-oriented) approach that uses globals to store relevant data. command line parser makes sure that user provides policy choice, pool size, and command file. command file parser reads in lines one at a time, and sets globals for operation type (allocate or free), reference number, and size (size is reference number in the case of free). then it calls appropriate policy function. we looked at data structure definition of node, which holds ref number, address, size, and next-ptr. then we wrote the code to do free, by searching through the list of nodes and unlinking the one with a matching refnum. we started on code for alloc, dealing with the case of allocating for the first time. we left it where students have to implement the rest of first-fit allocation.