Monday, August 25, 2014

Readings of chapters 1-4

Chapter 1: Intro
- First GC demo was a mistake. Had exhausted all memory on IBM machine, and GC printed out statistics of memory slowly and used up rest of demo’s time.

- Runtimes allow allocation on heap rather than stack or static allocation.
-- Needed for factories, closures/returned functions

1.1 Explicit deallocation
- Heap memory can be explicitly deallocated like in C.
- Runs risk of programmer error. 
- Two kinds of errors:
— Pointer to deallocated region = dangling pointer
—- Can be fixed with fat pointers, but not performant so only used for debugging
—  Region with no pointers but is never deallocated = memory leak
— Incorrect deallocation can cause both problems
- Difficult for concurrent access
- Solutions: Allocation from a pool which is freed as a whole, “ownership” semantics that prevent sharing and passing by reference ex: smart pointers, unique_ptr and shared_ptr
— Do all libraries used by the programmer use the same approach? Does the API require mixing styles?
- “Liveness is a global property but freeing is a local choice”

Saturday, August 23, 2014

First Post

I figured that I would introduce myself and this blog before filling it with content.


I am a CS student at RIT in my third year here. I've got a light background in backend web development, with a fair amount of experience in building distributed/concurrent systems. My focuses tend to be on functional programming, and on compiler implementation strategies. I've worked here as a student lab instructor for a semester and I've spent 7 months on co-op at EnerNOC, the place where I am now working part-time. 

This blog is my journal of my independent study in garbage collection. I'll be working under Professor Fluet; we hope to cover the classic garbage collection handbook and to create a number of small implementations of collectors around the racket dialect of scheme. I hope to culminate the class with useful contributions to Mlton's garbage collector, which Professor Fluet maintains.

I will be using this blog to describe the readings and to document the experience of the class. Our custom syllabus for the course is below: