April 03, 2003
Note from BKS

Sorry that the nav bar above is looking so bad -- it looked fine on my two machines at work, but now that I'm home I see that it's quite awful. But functional, alas. I'll see what I can do about it today, but I've got a ton of things to do.

What it does is take the most recent entry under a particular category and features the title of that entry. These are not editorial recommendations, but are automatic. Some original pieces were getting pushed down the page a little too fast. Scrolling down the home page is still the best way to see what's been going on.

Also, Netscape users should use a different browser to look at this site. I think it works on Netscape 7, but anything below that doesn't agree with the MovableType template that I'm using. It would take me a few days to get it to really conform, but I think in the end Netscape didn't implement some of the HTML that is used in this site. My apologies for this.

Posted by Brian Stefans at April 03, 2003 03:21 PM | TrackBack
Comments

When a variable is finished with it's work, it does not go into retirement, and it is never mentioned again. Variables simply cease to exist, and the thirty-two bits of data that they held is released, so that some other variable may later use them.

Posted by: Grace on January 19, 2004 03:10 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: Lawrence on January 19, 2004 03:11 AM

Being able to understand that basic idea opens up a vast amount of power that can be used and abused, and we're going to look at a few of the better ways to deal with it in this article.

Posted by: Faith on January 19, 2004 03:12 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: Adlard on January 19, 2004 03:12 AM

Note first that favoriteNumbers type changed. Instead of our familiar int, we're now using int*. The asterisk here is an operator, which is often called the "star operator". You will remember that we also use an asterisk as a sign for multiplication. The positioning of the asterisk changes its meaning. This operator effectively means "this is a pointer". Here it says that favoriteNumber will be not an int but a pointer to an int. And instead of simply going on to say what we're putting in that int, we have to take an extra step and create the space, which is what does. This function takes an argument that specifies how much space you need and then returns a pointer to that space. We've passed it the result of another function, , which we pass int, a type. In reality, is a macro, but for now we don't have to care: all we need to know is that it tells us the size of whatever we gave it, in this case an int. So when is done, it gives us an address in the heap where we can put an integer. It is important to remember that the data is stored in the heap, while the address of that data is stored in a pointer on the stack.

Posted by: Hugh on January 19, 2004 03:13 AM
-->