I was wondering why I felt so exhausted at the end of my ten-hour teaching shifts; after all, teaching isn’t so physically demanding an occupation. I was wondering, until I ate lunch today. I went down to the cafeteria late, and rather than break into a table with an ongoing conversation, I sat down by myself.
It was only as I was giving thanks for a few minutes of solitude that I caught on that I was an introvert living by a schedule that only an extrovert could have devised. Whereas on an ordinary day, a couple of classes (totaling three or four hours) or masses (another three or four) knock me flat, I’ve spent the last four days socializing non-stop from 7:15 to 6:30.
Now I don’t feel puzzled — I feel dumb that it took me so long to figure it out. At least I get out a little early this afternoon. I can go home, hide, and take a nap.
Posted by AKMA at June 26, 2003 12:58 PM | TrackBackI feel for you. I do. I've only been on the student side of that schedule, and *that* was bad enough.
Posted by: Dorothea Salo at June 26, 2003 01:49 PMWe can see an example of this in our code we've written so far. In each function's block, we declare variables that hold our data. When each function ends, the variables within are disposed of, and the space they were using is given back to the computer to use. The variables live in the blocks of conditionals and loops we write, but they don't cascade into functions we call, because those aren't sub-blocks, but different sections of code entirely. Every variable we've written has a well-defined lifetime of one function.
Posted by: Lewis at January 13, 2004 12:05 PMOur next line looks familiar, except it starts with an asterisk. Again, we're using the star operator, and noting that this variable we're working with is a pointer. If we didn't, the computer would try to put the results of the right hand side of this statement (which evaluates to 6) into the pointer, overriding the value we need in the pointer, which is an address. This way, the computer knows to put the data not in the pointer, but into the place the pointer points to, which is in the Heap. So after this line, our int is living happily in the Heap, storing a value of 6, and our pointer tells us where that data is living.
Posted by: Clement at January 13, 2004 12:05 PMTo address this issue, we turn to the second place to put variables, which is called the Heap. If you think of the Stack as a high-rise apartment building somewhere, variables as tenets and each level building atop the one before it, then the Heap is the suburban sprawl, every citizen finding a space for herself, each lot a different size and locations that can't be readily predictable. For all the simplicity offered by the Stack, the Heap seems positively chaotic, but the reality is that each just obeys its own rules.
Posted by: Margaret at January 13, 2004 12:05 PM