Stack vs. Heap

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Grigorenko

    Stack vs. Heap

    Hello,

    I couldn't find an obvious answer to this in the FAQ. My basic question,
    is: Is there any difference in allocating on the heap versus the stack? If
    heap or stack implementation is not part of the standard, then just
    disregard this question. Here's some questions I'm confused about, and if
    you can add anything else, please do so!

    Is the stack limited for each program?

    On the other hand, is the heap basically limitless (except of course limited
    to the size of memory or page files)?

    If I've got something on the heap, as I understand it, another program can
    update any of my allocated storage without me knowing? Can this happen on
    the stack?

    Is there any performance difference in using variables on the stack versus
    on the heap?

    Are global and static variables on the stack?

    The reason I ask is I'm starting to get into C#, and it makes a big deal
    about allocating a lot of stuff on a garbage collected heap. I wouldn't
    want to start asking off-topic questions, so I'll just ask this: would a
    concept like this follow from the fact that heap storage is better to use
    for some reason rather than storage on the stack?

    I appreciate it!
    Kevin Grigorenko


  • E. Robert Tisdale

    #2
    Off Topic: Stack vs. Heap

    Kevin Grigorenko wrote:
    [color=blue]
    >
    >
    > I couldn't find an obvious answer to this in the FAQ. My basic question,
    > is: Is there any difference in allocating on the heap versus the stack?
    > If heap or stack implementation is not part of the standard, then just
    > disregard this question. Here's some questions I'm confused about, and if
    > you can add anything else, please do so!
    >
    > Is the stack limited for each program?
    >
    > On the other hand, is the heap basically limitless (except of course limited
    > to the size of memory or page files)?
    >
    > If I've got something on the heap, as I understand it, another program can
    > update any of my allocated storage without me knowing? Can this happen on
    > the stack?
    >
    > Is there any performance difference in using variables on the stack versus
    > on the heap?
    >
    > Are global and static variables on the stack?
    >
    > The reason I ask is I'm starting to get into C#, and it makes a big deal
    > about allocating a lot of stuff on a garbage collected heap. I wouldn't
    > want to start asking off-topic questions, so I'll just ask this: would a
    > concept like this follow from the fact that heap storage is better to use
    > for some reason rather than storage on the stack?[/color]

    It depends upon your compiler.
    Please tell us which compiler you are using
    so that we can redirect to to the appropriate newsgroup.


    Comment

    • Kevin Grigorenko

      #3
      Re: Off Topic: Stack vs. Heap

      "E. Robert Tisdale" <E.Robert.Tisda le@jpl.nasa.gov > wrote in message
      news:3F84DA97.5 050403@jpl.nasa .gov...[color=blue]
      > Kevin Grigorenko wrote:
      >[color=green]
      > >
      > >
      > > I couldn't find an obvious answer to this in the FAQ. My basic[/color][/color]
      question,[color=blue][color=green]
      > > is: Is there any difference in allocating on the heap versus the stack?
      > > If heap or stack implementation is not part of the standard, then just
      > > disregard this question. Here's some questions I'm confused about, and[/color][/color]
      if[color=blue][color=green]
      > > you can add anything else, please do so!
      > >
      > > Is the stack limited for each program?
      > >
      > > On the other hand, is the heap basically limitless (except of course[/color][/color]
      limited[color=blue][color=green]
      > > to the size of memory or page files)?
      > >
      > > If I've got something on the heap, as I understand it, another program[/color][/color]
      can[color=blue][color=green]
      > > update any of my allocated storage without me knowing? Can this happen[/color][/color]
      on[color=blue][color=green]
      > > the stack?
      > >
      > > Is there any performance difference in using variables on the stack[/color][/color]
      versus[color=blue][color=green]
      > > on the heap?
      > >
      > > Are global and static variables on the stack?
      > >
      > > The reason I ask is I'm starting to get into C#, and it makes a big deal
      > > about allocating a lot of stuff on a garbage collected heap. I wouldn't
      > > want to start asking off-topic questions, so I'll just ask this: would a
      > > concept like this follow from the fact that heap storage is better to[/color][/color]
      use[color=blue][color=green]
      > > for some reason rather than storage on the stack?[/color]
      >
      > It depends upon your compiler.
      > Please tell us which compiler you are using
      > so that we can redirect to to the appropriate newsgroup.
      >
      >[/color]

      All of those questions are non-standard? Ok, I have no doubts, you guys are
      the experts. Let's say the compiler I'm using is VC++6. Also, I was
      looking for a C# newsgroup, so if you could also direct me to where I can
      post questions regarding that, that would be great. I couldn't find
      anything to the effect of comp.lang.cshar p.

      Is the concept of stack and heap completely independent of the standard?

      Thanks again!
      Kevin Grigorenko


      Comment

      • Josephine Schafer

        #4
        Re: Off Topic: Stack vs. Heap

        > Also, I was[color=blue]
        > looking for a C# newsgroup, so if you could also direct me to where I can
        > post questions regarding that, that would be great. I couldn't find
        > anything to the effect of comp.lang.cshar p.[/color]

        On Microsoft's news server (msnews.microso ft.com) -
        microsoft.publi c.dotnet.langua ges.csharp.


        Comment

        • Mike Wahler

          #5
          Re: [FAQs, links] Off Topic: Stack vs. Heap

          "Kevin Grigorenko" <kzg110@psu.edu > wrote in message
          news:bm2qgn$1n3 8$1@f04n12.cac. psu.edu...[color=blue]
          > "E. Robert Tisdale" <E.Robert.Tisda le@jpl.nasa.gov > wrote in message
          > news:3F84DA97.5 050403@jpl.nasa .gov...[color=green]
          > > Kevin Grigorenko wrote:
          > >[color=darkred]
          > > >
          > > >
          > > > I couldn't find an obvious answer to this in the FAQ. My basic[/color][/color]
          > question,[color=green][color=darkred]
          > > > is: Is there any difference in allocating on the heap versus the[/color][/color][/color]
          stack?[color=blue][color=green][color=darkred]
          > > > If heap or stack implementation is not part of the standard, then just
          > > > disregard this question. Here's some questions I'm confused about,[/color][/color][/color]
          and[color=blue]
          > if[color=green][color=darkred]
          > > > you can add anything else, please do so!
          > > >
          > > > Is the stack limited for each program?
          > > >
          > > > On the other hand, is the heap basically limitless (except of course[/color][/color]
          > limited[color=green][color=darkred]
          > > > to the size of memory or page files)?
          > > >
          > > > If I've got something on the heap, as I understand it, another program[/color][/color]
          > can[color=green][color=darkred]
          > > > update any of my allocated storage without me knowing? Can this[/color][/color][/color]
          happen[color=blue]
          > on[color=green][color=darkred]
          > > > the stack?
          > > >
          > > > Is there any performance difference in using variables on the stack[/color][/color]
          > versus[color=green][color=darkred]
          > > > on the heap?
          > > >
          > > > Are global and static variables on the stack?
          > > >
          > > > The reason I ask is I'm starting to get into C#, and it makes a big[/color][/color][/color]
          deal[color=blue][color=green][color=darkred]
          > > > about allocating a lot of stuff on a garbage collected heap. I[/color][/color][/color]
          wouldn't[color=blue][color=green][color=darkred]
          > > > want to start asking off-topic questions, so I'll just ask this: would[/color][/color][/color]
          a[color=blue][color=green][color=darkred]
          > > > concept like this follow from the fact that heap storage is better to[/color][/color]
          > use[color=green][color=darkred]
          > > > for some reason rather than storage on the stack?[/color]
          > >
          > > It depends upon your compiler.
          > > Please tell us which compiler you are using
          > > so that we can redirect to to the appropriate newsgroup.
          > >
          > >[/color]
          >
          > All of those questions are non-standard?[/color]

          While often implemented with 'stacks' and 'heaps',
          the C++ standard makes no requirements (or prohibitions)
          that they be used for memory management in a C++
          program. Storage is only classified as 'automatic'
          (local variables), 'static' (file scope variables,
          or local variables or class members specifically
          made static with the 'static' keyword), and
          'allocated', a.k.a. 'dynamic' (objects created
          with 'new', 'new[]' , 'calloc()', 'malloc()' or
          'realloc()'

          How these classes of storage are actually implemented
          is, well, implementation defined.
          [color=blue]
          > Ok, I have no doubts, you guys are
          > the experts.[/color]

          The skill level of people here varies widely, from
          complete novice to true 'gurus', some of whom are
          members of the ISO committee which standardized
          the C++ language. Even 'god' himself :-), Bjarne
          Stroustrup, has been known to drop in from time to
          time. Spend some time here, and I think you'll
          quickly get a feel for "who's who."
          [color=blue]
          >Let's say the compiler I'm using is VC++6.[/color]

          Here, it doesn't really matter which implementation
          (aka 'compiler') you use. C++ is a platform independent
          language. That's what the 'standard' is all about.
          [color=blue]
          > Also, I was
          > looking for a C# newsgroup, so if you could also direct me to where I can
          > post questions regarding that, that would be great.[/color]

          I'm pretty sure there are links to the C# (and other
          MS stuff) newsgroups at www.msdn.microsoft.com

          www.usenet.org and www.groups.google.com also have
          newsgroup directories.
          [color=blue]
          >I couldn't find
          > anything to the effect of comp.lang.cshar p.[/color]

          I think it's called
          microsoft.publi c.dotnet.langua ges.csharp

          but you can check the MSDN site to be sure.
          [color=blue]
          > Is the concept of stack and heap completely independent of the standard?[/color]

          Yes. object storage in standard C++ is only
          classified as 'automatic', 'static', and
          'allocated'.

          Much good information about standard C++ here:



          Info about this newsgroup:



          Information about a learning newsgroup for C and C++
          (alt.comp.lang. learn.c-c++):

          The "official" link is currently "out of order",
          this is a "mirror" of it (Thanks Arthur!)

          HTH,
          -Mike


          Comment

          • Peter van Merkerk

            #6
            Re: Stack vs. Heap

            > I couldn't find an obvious answer to this in the FAQ. My basic
            question,[color=blue]
            > is: Is there any difference in allocating on the heap versus the[/color]
            stack? If[color=blue]
            > heap or stack implementation is not part of the standard, then just
            > disregard this question. Here's some questions I'm confused about,[/color]
            and if[color=blue]
            > you can add anything else, please do so!
            >
            > Is the stack limited for each program?[/color]

            The C++ standard doesn't say anything about stack or its size (other
            than template class std::stack which is a different topic). But
            practically speaking the stack size is limited. How big the stack size
            is is depends on platform linkers settings...etc, in other words there
            is no standard answer to your question.
            [color=blue]
            > On the other hand, is the heap basically limitless (except of course[/color]
            limited[color=blue]
            > to the size of memory or page files)?[/color]

            Typically the stack is smaller than the available free store (=heap).
            Again the C++ standard doesn't say anything about this, so the answer
            depends on what platform you are using.
            [color=blue]
            > If I've got something on the heap, as I understand it, another program[/color]
            can[color=blue]
            > update any of my allocated storage without me knowing?[/color]

            Since the C++ standard says nothing about running multiple processes on
            the same system, this is an OS/platform issue not an C++ issue. OSes
            like Linux and the 32-bit Windows versions normally do not allow one
            program to write in the memory space of another program (though often
            the OS does provide means to get around this barrier for example to
            allow debuggers to change variables). Other OSes provide no protection
            at all.
            [color=blue]
            > Can this happen on the stack?[/color]

            Since stacks typically reside in the same memory space as the heap the
            same rules apply. If the OS/platform allows other programs to write to
            the memory space of your program they can potentially damage the stack
            as well. If you have a multithreaded program, each thread has its own
            stack but typically share one heap.
            [color=blue]
            > Is there any performance difference in using variables on the stack[/color]
            versus[color=blue]
            > on the heap?[/color]

            Stack variable tend to be faster because most if not all the work to
            allocate space on the stack can be done during compile time. For heap
            allocation something always needs to be done during runtime.
            [color=blue]
            > Are global and static variables on the stack?[/color]

            No.
            [color=blue]
            > The reason I ask is I'm starting to get into C#, and it makes a big[/color]
            deal[color=blue]
            > about allocating a lot of stuff on a garbage collected heap. I[/color]
            wouldn't[color=blue]
            > want to start asking off-topic questions, so I'll just ask this: would[/color]
            a[color=blue]
            > concept like this follow from the fact that heap storage is better to[/color]
            use[color=blue]
            > for some reason rather than storage on the stack?[/color]

            No, the reason why C# more heavilly relies on heap is because it is
            fundamentally different programming language than C++. The trade offs
            are different and consequently things that make sense with C# (or Java
            for that matter) do not necessarilly make sense in C++.

            In C++ use stack objects where you can, use heap objects when you have
            to. Besides efficiency of stack objects another (often even more
            important) plus of stack objects is the automatic cleanup when they run
            out of scope. Because C++ has no garbage collected heap, manually
            creating and destroying objects on the heap is not only a pain, but also
            difficult to get right i.c.w. exceptions.

            --
            Peter van Merkerk
            peter.van.merke rk(at)dse.nl





            Comment

            • David B. Held

              #7
              Re: Off Topic: Stack vs. Heap

              "Kevin Grigorenko" <kzg110@psu.edu > wrote in message
              news:bm2qgn$1n3 8$1@f04n12.cac. psu.edu...[color=blue][color=green][color=darkred]
              > > > [...]
              > > > Is there any difference in allocating on the heap versus
              > > > the stack?[/color][/color][/color]

              Yes. It's one of the most fundamental storage issues in
              programming. In C++, stack-allocated variables have
              "automatic" storage, which means that their storage is
              allocated automatically, and they are destroyed
              automatically when they go out of scope. Heap-allocated
              data is allocated explicitly and destroyed explicitly, which
              allows you to control its lifetime.
              [color=blue][color=green][color=darkred]
              > > > [...]
              > > > Is the stack limited for each program?[/color][/color][/color]

              That's implementation-dependent. Some systems have a
              fixed-size stack, and others will grow the stack for you up
              to a limit. All systems will experience a stack overflow if
              you call a recursive function with no terminating condition.
              In that technical sense, the answer is "yes". ;>
              [color=blue][color=green][color=darkred]
              > > > On the other hand, is the heap basically limitless
              > > > (except of course limited to the size of memory or
              > > > page files)?[/color][/color][/color]

              C++ does not specify any limit on the heap size. However,
              your heap will be limited by the address space of your
              hardware, at the least.
              [color=blue][color=green][color=darkred]
              > > > If I've got something on the heap, as I understand it,
              > > > another program can update any of my allocated
              > > > storage without me knowing?[/color][/color][/color]

              If it can get a reference into your storage, yes. Whether that
              is allowed depends on your operating system, not your
              programming language.
              [color=blue][color=green][color=darkred]
              > > > Can this happen on the stack?[/color][/color][/color]

              Implementation-defined.
              [color=blue][color=green][color=darkred]
              > > > Is there any performance difference in using variables
              > > > on the stack versus on the heap?[/color][/color][/color]

              Heap allocation is almost always more expensive than
              stack allocation, and often by a significant margin.
              [color=blue][color=green][color=darkred]
              > > > Are global and static variables on the stack?[/color][/color][/color]

              They are typically allocated their own (non-stack) storage.
              [color=blue][color=green][color=darkred]
              > > > The reason I ask is I'm starting to get into C#, and it
              > > > makes a big deal about allocating a lot of stuff on a
              > > > garbage collected heap.[/color][/color][/color]

              Garbage collection is a whole different ball of wax. The
              allocation/collection times may be totally different for a
              collected system than an explicitly allocated system. So
              getting answers about C++ won't necessarily tell you about
              C#. Whether you pay a performance penalty depends on
              the nature of your application. One can always produce
              pathological test cases for any allocation scheme. It
              also depends on your requirements.
              [color=blue][color=green][color=darkred]
              > > > [...]
              > > > would a concept like this follow from the fact that heap
              > > > storage is better to use for some reason rather than
              > > > storage on the stack?[/color][/color][/color]

              Generally, the so-called "4GL" languages tend to prefer
              heap allocation because it makes dealing with references
              simpler. If everything lives on the heap, then you can't end
              up with a dangling reference. It may also simply the design
              and implementation of the language in other ways. It is
              certainly not because heap allocation with collection is
              always a better method.
              [color=blue]
              > [...]
              > All of those questions are non-standard?[/color]

              Not at all. Many of them are relevant to C++.
              [color=blue]
              > Ok, I have no doubts, you guys are the experts.[/color]

              You can't assume that anyone who posts here is an expert
              (me included!).
              [color=blue]
              > Let's say the compiler I'm using is VC++6.[/color]

              Don't forget to always start your programs with "void main()". ;>
              [color=blue]
              > Also, I was looking for a C# newsgroup, so if you could
              > also direct me to where I can post questions regarding
              > that, that would be great. I couldn't find anything to the
              > effect of comp.lang.cshar p.[/color]

              It's not exactly as popular as other older languages. Whether
              that is a good or bad thing is up to you to decide.
              [color=blue]
              > Is the concept of stack and heap completely independent
              > of the standard?[/color]

              Many languages utilize the concept of a stack and program
              heap (most stack-based languages, for instance). But if you
              are asking if the C++ standard talks about them, it most
              certainly does. Otherwise, it would have a peculiar time
              explaining operator new and delete.

              Dave



              ---
              Outgoing mail is certified Virus Free.
              Checked by AVG anti-virus system (http://www.grisoft.com).
              Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003


              Comment

              • Mike Wahler

                #8
                Re: Off Topic: Stack vs. Heap

                "David B. Held" <dheld@codelogi cconsulting.com > wrote in message
                news:bm37v6$oa5 $1@news.astound .net...[color=blue]
                > Many languages utilize the concept of a stack and program
                > heap (most stack-based languages, for instance). But if you
                > are asking if the C++ standard talks about them, it most
                > certainly does.[/color]

                Citations please.

                -Mike


                Comment

                • David B. Held

                  #9
                  Re: Off Topic: Stack vs. Heap

                  "Mike Wahler" <mkwahler@mkwah ler.net> wrote in message
                  news:Gv9hb.4024 $dn6.2193@newsr ead4.news.pas.e arthlink.net...[color=blue]
                  > "David B. Held" <dheld@codelogi cconsulting.com > wrote in message
                  > news:bm37v6$oa5 $1@news.astound .net...[color=green]
                  > > Many languages utilize the concept of a stack and program
                  > > heap (most stack-based languages, for instance). But if you
                  > > are asking if the C++ standard talks about them, it most
                  > > certainly does.[/color]
                  >
                  > Citations please.[/color]

                  Well, 12.5, for instance. The standard calls it the "free store",
                  but I would be interested to see your argument for why that
                  doesn't mean "program heap".

                  Then there's 15.2/3, which talks about "stack unwinding". It's
                  pretty hard to unwind a stack if you don't have a stack.

                  Dave



                  ---
                  Outgoing mail is certified Virus Free.
                  Checked by AVG anti-virus system (http://www.grisoft.com).
                  Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003


                  Comment

                  • tom_usenet

                    #10
                    Re: Stack vs. Heap

                    On Wed, 8 Oct 2003 23:22:14 -0400, "Kevin Grigorenko" <kzg110@psu.edu >
                    wrote:
                    [color=blue]
                    >Hello,
                    >
                    >I couldn't find an obvious answer to this in the FAQ. My basic question,
                    >is: Is there any difference in allocating on the heap versus the stack?[/color]

                    Yes, lots.

                    If[color=blue]
                    >heap or stack implementation is not part of the standard, then just
                    >disregard this question.[/color]

                    They aren't part of the standard, but the related concepts of
                    "automatic storage" and "dynamic storage" (often implemented as a
                    stack and heap respectively) are.
                    [color=blue]
                    >Is the stack limited for each program?[/color]

                    Yes, usually, in a platform dependent manner.
                    [color=blue]
                    >On the other hand, is the heap basically limitless (except of course limited
                    >to the size of memory or page files)?[/color]

                    Yes, usually, but this is platform dependent.
                    [color=blue]
                    >If I've got something on the heap, as I understand it, another program can
                    >update any of my allocated storage without me knowing? Can this happen on
                    >the stack?[/color]

                    OS dependent. Modern OSes usually have protected memory spaces - each
                    process can only access its own memory.
                    [color=blue]
                    >Is there any performance difference in using variables on the stack versus
                    >on the heap?[/color]

                    A big one. Automatic storage is usually *much* faster than dynamic
                    storage.
                    [color=blue]
                    >Are global and static variables on the stack?[/color]

                    No. They are in "static storage", which may be allocated at program or
                    module startup.
                    [color=blue]
                    >The reason I ask is I'm starting to get into C#, and it makes a big deal
                    >about allocating a lot of stuff on a garbage collected heap. I wouldn't
                    >want to start asking off-topic questions, so I'll just ask this: would a
                    >concept like this follow from the fact that heap storage is better to use
                    >for some reason rather than storage on the stack?[/color]

                    With dynamic storage you can control the lifetime of the storage,
                    whereas with automatic storage the storage is lost when the variable
                    goes out of scope.

                    However, the fact that automatic storage can be used for class objects
                    as well as int, double, etc. is one of C++'s strengths. Because
                    automatic storage is so much faster, this gives C++ an overwhelming
                    performance advantage in some situations over languages (like Java and
                    C#) that only allow allocation of class objects in dynamic storage. In
                    addition, use of the stack allows C++ to provide a superior construct
                    to finally - RAII through destructors.

                    To summarize, use automatic storage whenever you can and dynamic
                    storage only when you must.

                    Tom

                    Comment

                    • Gavin Deane

                      #11
                      Re: Off Topic: Stack vs. Heap

                      "Kevin Grigorenko" <kzg110@psu.edu > wrote in message news:<bm2qgn$1n 38$1@f04n12.cac .psu.edu>...[color=blue]
                      > Is the concept of stack and heap completely independent of the standard?[/color]

                      The standard defines static, dynamic and automatic storage duration,
                      which determine the life time of objects in your program. How those
                      storage durations are implemented (stack, heap, some other system),
                      whether there is a maximum amount of memory available, and whether
                      other programs can interfere with memory you have used are all details
                      specific to your implementation and operating system.

                      GJD

                      Comment

                      • osmium

                        #12
                        Re: Off Topic: Stack vs. Heap

                        "Kevin Grigorenko" writes:
                        [color=blue][color=green]
                        > > Is the concept of stack and heap completely independent of the standard?[/color][/color]

                        Formally, yes. But if someone from Mars were to implement a compiler they
                        would likely invent the stack shortly after they started to write the code
                        for the "auto" type. But they might use a different name for it.


                        Comment

                        • Julián Albo

                          #13
                          Re: Off Topic: Stack vs. Heap

                          osmium escribió:
                          [color=blue]
                          > Formally, yes. But if someone from Mars were to implement a compiler they
                          > would likely invent the stack shortly after they started to write the code
                          > for the "auto" type. But they might use a different name for it.[/color]

                          I have read on www.perl.org that Parrot will use a linked list of
                          garbage collected structures.

                          Regards.

                          Comment

                          • Gavin Deane

                            #14
                            Re: Off Topic: Stack vs. Heap

                            "David B. Held" <dheld@codelogi cconsulting.com > wrote in message news:<bm39l9$od l$1@news.astoun d.net>...[color=blue]
                            > "Mike Wahler" <mkwahler@mkwah ler.net> wrote in message
                            > news:Gv9hb.4024 $dn6.2193@newsr ead4.news.pas.e arthlink.net...[color=green]
                            > > "David B. Held" <dheld@codelogi cconsulting.com > wrote in message
                            > > news:bm37v6$oa5 $1@news.astound .net...[color=darkred]
                            > > > Many languages utilize the concept of a stack and program
                            > > > heap (most stack-based languages, for instance). But if you
                            > > > are asking if the C++ standard talks about them, it most
                            > > > certainly does.[/color]
                            > >
                            > > Citations please.[/color]
                            >
                            > Well, 12.5, for instance. The standard calls it the "free store",
                            > but I would be interested to see your argument for why that
                            > doesn't mean "program heap".
                            >
                            > Then there's 15.2/3, which talks about "stack unwinding". It's
                            > pretty hard to unwind a stack if you don't have a stack.[/color]

                            Though perhaps not impossible, since "stack unwinding" is defined
                            without "stack" being defined.

                            GJD

                            Comment

                            • WW

                              #15
                              Re: Off Topic: Stack vs. Heap

                              Gavin Deane wrote:[color=blue][color=green]
                              >> Then there's 15.2/3, which talks about "stack unwinding". It's
                              >> pretty hard to unwind a stack if you don't have a stack.[/color]
                              >
                              > Though perhaps not impossible, since "stack unwinding" is defined
                              > without "stack" being defined.[/color]

                              The following standards contain provisions which, through reference in this
                              text, constitute provisions of this International Standard...

                              - ISO/IEC 2382 (all parts), Information technology - Vocabulary

                              So it seems stack does not need to be defined in the C++ standard.

                              --
                              WW aka Attila


                              Comment

                              Working...