Re: difference between stack & heap (general, for a newbie)
From: Sean Cook (news_at_ghink.com)
Date: 01/27/04
- Next message: Karl Heinz Buchegger: "Re: difference between stack & heap (general, for a newbie)"
- Previous message: Jonathan Turkanis: "Re: Learning C++"
- In reply to: Andrey Tarasevich: "Re: difference between stack & heap (general, for a newbie)"
- Next in thread: Karl Heinz Buchegger: "Re: difference between stack & heap (general, for a newbie)"
- Reply: Karl Heinz Buchegger: "Re: difference between stack & heap (general, for a newbie)"
- Reply: Kevin Goodsell: "Re: difference between stack & heap (general, for a newbie)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Jan 2004 07:47:41 -0800
Andrey (and others),
I now see that my question was far too ambiguous. I understand the
difference between std::stack and std::heap as far as looking at each
of those data structures as abstract data types, I just do not
understand how these two data structures are implemented when your C++
code is compiled.
What I should've asked is "what is the scope of data when allocated
from the heap, and what is the scope of data when allocated from the
stack (where ``heap'' and ``stack'' are not standards, but are merely
common terms.)
And also, is there a performance difference, in general, of objects
allocated on the stack versus those allocated on the heap, or is this
a completely meaningless question?
Thanks.
Sean
Andrey Tarasevich <andreytarasevich@hotmail.com> wrote in message news:<101b7n8gm0fnk76@news.supernews.com>...
> Sean Cook wrote:
> > ...
> > can anyone give me a good, thorough explanation of the difference
> > between the heap and the stack in C++?
> > ...
>
> Your question is too ambiguous to be answered right away.
>
> There are data structures called 'stack' (see 'std::stack') and 'heap'
> (see 'std::make_heap').
>
> There are memory types commonly referred to as 'stack' and 'heap'
> (although these terms are unofficial or semi-official in C++ world).
>
> Would you please clarify what your question is about?
- Next message: Karl Heinz Buchegger: "Re: difference between stack & heap (general, for a newbie)"
- Previous message: Jonathan Turkanis: "Re: Learning C++"
- In reply to: Andrey Tarasevich: "Re: difference between stack & heap (general, for a newbie)"
- Next in thread: Karl Heinz Buchegger: "Re: difference between stack & heap (general, for a newbie)"
- Reply: Karl Heinz Buchegger: "Re: difference between stack & heap (general, for a newbie)"
- Reply: Kevin Goodsell: "Re: difference between stack & heap (general, for a newbie)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|