Re: where? heap or stack?
From: Jeff Schwab (jeffplus_at_comcast.net)
Date: 05/05/04
- Next message: bartek: "Re: Weirdness: (-0.666667 + 0.333333)"
- Previous message: bartek: "Re: Weirdness: (-0.666667 + 0.333333)"
- In reply to: Leor Zolman: "Re: where? heap or stack?"
- Next in thread: Leor Zolman: "Re: where? heap or stack?"
- Reply: Leor Zolman: "Re: where? heap or stack?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 05 May 2004 10:13:03 -0400
Leor Zolman wrote:
> On Wed, 05 May 2004 06:25:18 -0400, Jeff Schwab <jeffplus@comcast.net>
> wrote:
>
>
>
>>Yes. Careful about calling it "heap," though; "stack" and "heap" in C++
>>refer to standard data structures, not to regions of memory.
>>
>
>
> Interesting this issue should just now come up, as I was wondering myself
> about it while reading through Eckel/Allison's _Thinking in C++ Volume II_.
> Throughout the book, they use the word "heap" synonymously with "free
> store". IOW, instead of saying "allocated dynamically" or even "allocated
> on/from the free store", they consistently say "from the heap", use the
> term "heap memory", and even name a utility class for monitoring use of
> new/delete "TraceHeap".
>
> Now I'm used to seeing this wording being picked on, but hasn't it in fact
> become effectively idiomatic to say "allocated on the heap" when you simply
> mean dynamically? Sort of like the word "momentarily" has now,
> unfortunately, become effectively synonymous with "in a moment"? In
> reality, how often is the use of the word "heap" /really/ going to be
> ambiguous when it pops up in discussions like this? I'm not happy about it,
> but I'd vote to bite the bullet and just let people say "heap" unmolested
> unless it really isn't clear what they're talking about...
You're absolutely right. The FAQ for this group even refers to the
stack & the heap in the idiomatic way. Unfortunately, when one uses
these terms in a news group posting, someone likely will get very huffy
and say something pedantic unless you beat them to the punch. I try to
do nip such complaints in the bud in a more humane way than some folks
might.
Of course, in "real world" conversations, development is usually being
done for well-known platforms, so I can point to documentation that
explains the free store really is a heap, and that function-scoped
variables really are on a stack. :)
- Next message: bartek: "Re: Weirdness: (-0.666667 + 0.333333)"
- Previous message: bartek: "Re: Weirdness: (-0.666667 + 0.333333)"
- In reply to: Leor Zolman: "Re: where? heap or stack?"
- Next in thread: Leor Zolman: "Re: where? heap or stack?"
- Reply: Leor Zolman: "Re: where? heap or stack?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|