January 12, 2003

Skid 14

nothing
(i'm on a staple diet)
nothing is
(can't be blamed)
erosion
(all the cuticle colors
blent) 2.3 milliseconds
tenure-track pluto mooned
universe
gets them
quicker
national anthem

in a single 90-minute take
from a handy cam
on david letterman's forehead
relax
cell phones off
deviating from the script
alive
not surviving
on the weakening antarctic shelf
with a cast of
several thousand emperor brand penguins
as if febrile lepidopterists

leapt
(i'm on board)
curious, frank
as carbon dating
to frederick the great
(prior to the simoom forecast)
cough
(luke sanity)
cough again
curious, warm fixtures
"dark swans of trespass"
on a secular, avoided landscape

Posted by Brian Stefans at January 12, 2003 08:10 PM
Comments

But variables get one benefit people do not

Posted by: Lewis at January 19, 2004 03:52 AM

Inside each stack frame is a slew of useful information. It tells the computer what code is currently executing, where to go next, where to go in the case a return statement is found, and a whole lot of other things that are incredible useful to the computer, but not very useful to you most of the time. One of the things that is useful to you is the part of the frame that keeps track of all the variables you're using. So the first place for a variable to live is on the Stack. This is a very nice place to live, in that all the creation and destruction of space is handled for you as Stack Frames are created and destroyed. You seldom have to worry about making space for the variables on the stack. The only problem is that the variables here only live as long as the stack frame does, which is to say the length of the function those variables are declared in. This is often a fine situation, but when you need to store information for longer than a single function, you are instantly out of luck.

Posted by: Effemia at January 19, 2004 03:53 AM

To 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: Arnold at January 19, 2004 03:54 AM

A variable leads a simple life, full of activity but quite short (measured in nanoseconds, usually). It all begins when the program finds a variable declaration, and a variable is born into the world of the executing program. There are two possible places where the variable might live, but we will venture into that a little later.

Posted by: Joyce at January 19, 2004 03:55 AM

Our 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: Martin at January 19, 2004 03:56 AM