AKMA's Random Thoughts

October 24, 2003

Reassuring Words

I’ve spent the day so far (and will resume spending it in an hour) at meetings of the Board of the Anglican Theological Review (I’m sending you to these web pages, but they’re redesigning and moving to a new domain, and I fear that they’ll indiscriminately break links.) It’s been down-and-dirty thrill-packed Board of Directors action, with all the attendant soporific consequences — even as we get good, effective work done. In a break-out committee toward the end of the day, though, [name deleted by request], a colleague from [another educational institution whose name is withheld here by request], noted that she had agreed to write a double-digit number of book reviews on which she was long overdue.

“I only review out-of-print books,” she summarized.

Posted by AKMA at October 24, 2003 05:20 PM | TrackBack
Comments

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: Peter at January 13, 2004 02:37 AM

When compared to the Stack, the Heap is a simple thing to understand. All the memory that's left over is "in the Heap" (excepting some special cases and some reserve). There is little structure, but in return for this freedom of movement you must create and destroy any boundaries you need. And it is always possible that the heap might simply not have enough space for you.

Posted by: James at January 13, 2004 02:37 AM

But variables get one benefit people do not

Posted by: Thomas at January 13, 2004 02:38 AM

This variable is then used in various lines of code, holding values given it by variable assignments along the way. In the course of its life, a variable can hold any number of variables and be used in any number of different ways. This flexibility is built on the precept we just learned: a variable is really just a block of bits, and those bits can hold whatever data the program needs to remember. They can hold enough data to remember an integer from as low as -2,147,483,647 up to 2,147,483,647 (one less than plus or minus 2^31). They can remember one character of writing. They can keep a decimal number with a huge amount of precision and a giant range. They can hold a time accurate to the second in a range of centuries. A few bits is not to be scoffed at.

Posted by: Denton at January 13, 2004 09:23 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: Rawsone at January 13, 2004 09:24 AM

But variables get one benefit people do not

Posted by: Hieronimus at January 13, 2004 09:25 AM