Announcement

Collapse
No announcement yet.

Is this a reasonable way to implement a stack ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by Urban Ranger
    For a general purpose CPU with a hardware stack pointer, the size of the stack is bound by the size of the stack pointer. Microcontrollers are more interesting since the available RAM is usually much more limited.
    Are we meddling call stacks with storage stacks? Come on UR, what kind of stack he means is glaring obvious from the opening post.

    Comment


    • #32
      Be nice, he's trying to save face.
      “As a lifelong member of the Columbia Business School community, I adhere to the principles of truth, integrity, and respect. I will not lie, cheat, steal, or tolerate those who do.”
      "Capitalism ho!"

      Comment


      • #33
        Originally posted by Sir Ralph
        What's interesting is, that I used them (try quoting my post), but they didn't do squat other than changing the font to Courier.
        Possibly because you used html code tags rather than vB-code code tags (try quoting my post).
        I'm building a wagon! On some other part of the internets, obviously (but not that other site).

        Comment


        • #34
          Originally posted by Skanky Burns
          Possibly because you used html code tags rather than vB-code code tags (try quoting my post).
          I have to steal loinburgers excellent smiley here:

          Comment


          • #35
            Originally posted by Urban Ranger
            For a general purpose CPU with a hardware stack pointer, the size of the stack is bound by the size of the stack pointer.
            It is true that you would have a bit of difficulty growing a stack beyond 4294967296 bytes on a 32-bit machine, but I don't think that necessarily justifies allocating 4294967296 bytes for a stack.
            <p style="font-size:1024px">HTML is disabled in signatures </p>

            Comment


            • #36
              Thankyou for this thread. This week I have had difficulty sleeping, but now I just have to glance at this thread and I am unconscious for days...
              Speaking of Erith:

              "It's not twinned with anywhere, but it does have a suicide pact with Dagenham" - Linda Smith

              Comment


              • #37
                Originally posted by Provost Harrison
                Thankyou for this thread. This week I have had difficulty sleeping, but now I just have to glance at this thread and I am unconscious for days...
                Does this mean you won't come again for a few days with your insightful additions?

                Oh noes! How will we survive this?

                Comment


                • #38
                  Originally posted by Sir Ralph
                  Are we meddling call stacks with storage stacks? Come on UR, what kind of stack he means is glaring obvious from the opening post.
                  It makes no diffence. The call stack is just a special stack due to hardware awareness. In fact, some CPUs have no stack pointers and you can use any register to create the call stack.
                  (\__/) 07/07/1937 - Never forget
                  (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
                  (")_(") "Starting the fire from within."

                  Comment


                  • #39
                    Originally posted by Urban Ranger
                    It makes no diffence. The call stack is just a special stack due to hardware awareness. In fact, some CPUs have no stack pointers and you can use any register to create the call stack.
                    Originally posted by loinburger
                    It is true that you would have a bit of difficulty growing a stack beyond 4294967296 bytes on a 32-bit machine, but I don't think that necessarily justifies allocating 4294967296 bytes for a stack.
                    <p style="font-size:1024px">HTML is disabled in signatures </p>

                    Comment


                    • #40
                      “As a lifelong member of the Columbia Business School community, I adhere to the principles of truth, integrity, and respect. I will not lie, cheat, steal, or tolerate those who do.”
                      "Capitalism ho!"

                      Comment


                      • #41
                        Originally posted by DaShi
                        If you've got a 32-bit machine, then it's tricky (but certainly not impossible) to address more than 2^32 bytes of memory. So you could allocate a 2^32 byte fixed size array to implement a stack, and then say "But I didn't unnecessarily bound the size of the stack!" to defend your design choice.
                        <p style="font-size:1024px">HTML is disabled in signatures </p>

                        Comment


                        • #42
                          Originally posted by loinburger
                          It is true that you would have a bit of difficulty growing a stack beyond 4294967296 bytes on a 32-bit machine, but I don't think that necessarily justifies allocating 4294967296 bytes for a stack.
                          Unless you have a special machine that can exceed the hard 32-bit limit addressing space, I don't think it's physically possible to allocate that much to the stack.

                          Besides, you probably will run into physical limits before that, esp. with microcontrollers.
                          (\__/) 07/07/1937 - Never forget
                          (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
                          (")_(") "Starting the fire from within."

                          Comment


                          • #43
                            If your stack implementation is external then you're limited only by the capacity of your persistent storage device(s).
                            <p style="font-size:1024px">HTML is disabled in signatures </p>

                            Comment


                            • #44
                              This is a very silly discussion.

                              SP
                              I got the Jete from C.C. Sabathia. : Jon Miller

                              Comment


                              • #45
                                Originally posted by Urban Ranger
                                The simplest way is to use a fixed sized array. This way you will never get a stack overrun or underrrun.
                                Honestly, what is your alma mater? This is fascinating.
                                "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                                Ben Kenobi: "That means I'm doing something right. "

                                Comment

                                Working...
                                X