Lecture: Scheme Memory Model

Jerry Cain - Stanford

 
Previous LectureNext Lecture

Description

Lecture Description

Scheme Memory Model - How Scheme Instructions Synthesize Linked Lists Behind the Scenes and Perform Operations on Them, Two Different Ways of Laying Out A List In Memory, One With Memory Aliasing and One Without, The Scheme Equivalent of "..." (Functions With Multiple Arguments), Writing A Generic Map Function, Modifying the Unary-Map Function to Handle Multiple Arguments By Adding A . to the List of Arguments, Extending Unary-Map to An N-Ary Map Implementation Using ., Sample Trace of the N-Ary Map Function, Garbage Collection In Scheme, How Care Must Be Taken When Reclaiming Global Variables to Ensure That They Won't Be Needed Later, High-Level Mechanics of Garbage Collection: Reference Counts, or Sweeping Through the Data and Marking All Reachable Data, Then Freeing the Rest, Other Functional Languages: Scheme, ML, Haskell, Erlang

Course Description

Topics include: Advanced memory management features of C and C++; the differences between imperative and object-oriented paradigms; the functional paradigm (using LISP) and concurrent programming (using C and C++); brief survey of other modern languages such as Python, Objective C, and C#.

Prerequisites: Programming and problem solving at the Programming Abstractions level. Prospective students should know a reasonable amount of C++. You should be comfortable with arrays, pointers, references, classes, methods, dynamic memory allocation, recursion, linked lists, binary search trees, hashing, iterators, and function pointers. You should be able to write well-decomposed, easy-to-understand code, and understand the value that comes with good variable names, short function and method implementations, and thoughtful, articulate comments.

from course: Computer Science III: Programming Paradigms

Comments

Related Lectures