This is for all you geeks out there

I will liken my cleaning habits unto a garbage-collected memory management system. I store most objects in a heap (literally a heap on the floor next to my bed). When I have to allocate space to store a grocery receipt, a book I’m reading, or mail I don’t want to deal with yet, I put it on the heap. In my mind I try to keep a reference to each object, but slowly over time many of the references are lost and the objects become irrelevant.

Then cleaning inspections come along, or maybe just a random cleaning urge. That’s when it’s time to collect the garbage—to deallocate the space taken up by stale old useless objects in order to make room for new useless objects! So I go through the heap, one object at a time, and when I come upon something that isn’t being used any more, I either shred it, recycle it, or trash it. Thus the garbage is collected, the heap size is decreased, and I can happily continue allocating space for random stuff with abandon.

The main problem with this system is that I always have a huge heap of stuff on the floor, and I have to spend time sorting through it every once in a while. But boy it’s easy to use!

More conscientious people probably manage space manually, thus keeping their heap size down (to the point of nonexistence, even) and avoiding the need to do periodic garbage collection. The danger there is the memory leak—if no system of periodic garbage collection exists, allocated space will just go on being used even if it’s forgotten about.

But my metaphor is now way overextended. Ah, but we did just pass our inspection. Go GCMM!







3 responses to “This is for all you geeks out there”

  1. Gabe Avatar

    You need to start living JAVA man!

    1. Josh Avatar

      Well, I’ve been doing a lot of C# lately due to my class, but don’t worry — it’s garbage-collected, too!

  2. Slacker Avatar

    I love it. It all makes sense now. I don’t think that you could possibly find a better analogy. If only the layman could truly understand the intricacies of this.

    Just remember to stay #, and all will be well.

Leave a Reply

Your email address will not be published. Required fields are marked *