Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ???

???

Scheduled Pinned Locked Moved C / C++ / MFC
questioncomdata-structurestoolsperformance
42 Posts 10 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Eytukan

    There used to be a C function that any programmer could use for allocating memory off the stack. The memory was automatically deallocated when the calling function returned. This was a dangerous function to call. it’s not available anymore. What is he possibly talking about??:~ AnyIdea? he=A C programmer.


    --[V]--

    [My Current Status]

    N Offline
    N Offline
    Nemanja Trifunovic
    wrote on last edited by
    #2

    alloca[^]


    My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

    E 1 Reply Last reply
    0
    • E Eytukan

      There used to be a C function that any programmer could use for allocating memory off the stack. The memory was automatically deallocated when the calling function returned. This was a dangerous function to call. it’s not available anymore. What is he possibly talking about??:~ AnyIdea? he=A C programmer.


      --[V]--

      [My Current Status]

      L Offline
      L Offline
      Laxman Auti
      wrote on last edited by
      #3

      The memory is deallocated automatically when program terminates In case of java there is special garbage collecter for deallocation of the memory during run time So its better that when you allocates memory inside the function then before returning allocated memory must deallocate. :) Knock out 'T' from CAN'T , You 'CAN' if you think you 'CAN' :cool:

      N T 2 Replies Last reply
      0
      • L Laxman Auti

        The memory is deallocated automatically when program terminates In case of java there is special garbage collecter for deallocation of the memory during run time So its better that when you allocates memory inside the function then before returning allocated memory must deallocate. :) Knock out 'T' from CAN'T , You 'CAN' if you think you 'CAN' :cool:

        N Offline
        N Offline
        Nibu babu thomas
        wrote on last edited by
        #4

        A_Laxman wrote:

        The memory is deallocated automatically when program terminates

        :~

        A_Laxman wrote:

        So its better that when you allocates memory inside the function then before returning allocated memory must deallocate.

        alloca doesn't require that.


        Nibu thomas Software Developer Faqs by Michael dunn

        1 Reply Last reply
        0
        • N Nemanja Trifunovic

          alloca[^]


          My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

          E Offline
          E Offline
          Eytukan
          wrote on last edited by
          #5

          Got it.Thanks !! :beer:


          --[V]--

          [My Current Status]

          T 1 Reply Last reply
          0
          • E Eytukan

            There used to be a C function that any programmer could use for allocating memory off the stack. The memory was automatically deallocated when the calling function returned. This was a dangerous function to call. it’s not available anymore. What is he possibly talking about??:~ AnyIdea? he=A C programmer.


            --[V]--

            [My Current Status]

            P Offline
            P Offline
            ppatel567
            wrote on last edited by
            #6

            VuNic, Have you have simple common sense? Just write something sensible relevant to the matter of your post in the subject line than just "???" May be thats why you are just stuck with "C" :)) ppatel

            E S T S 4 Replies Last reply
            0
            • P ppatel567

              VuNic, Have you have simple common sense? Just write something sensible relevant to the matter of your post in the subject line than just "???" May be thats why you are just stuck with "C" :)) ppatel

              E Offline
              E Offline
              Eytukan
              wrote on last edited by
              #7

              ---Sorry for making it look like the SB ----

              T N 2 Replies Last reply
              0
              • P ppatel567

                VuNic, Have you have simple common sense? Just write something sensible relevant to the matter of your post in the subject line than just "???" May be thats why you are just stuck with "C" :)) ppatel

                S Offline
                S Offline
                Stephen Hewitt
                wrote on last edited by
                #8

                Possible a bit bluntly put, but true nevertheless. Steve

                1 Reply Last reply
                0
                • L Laxman Auti

                  The memory is deallocated automatically when program terminates In case of java there is special garbage collecter for deallocation of the memory during run time So its better that when you allocates memory inside the function then before returning allocated memory must deallocate. :) Knock out 'T' from CAN'T , You 'CAN' if you think you 'CAN' :cool:

                  T Offline
                  T Offline
                  ThatsAlok
                  wrote on last edited by
                  #9

                  A_Laxman wrote:

                  In case of java there is special garbage collecter for deallocation of the memory during run time

                  Sorry for Sounding Rude, this is not JAVA forum and C++ doesn't have Inbuild Garbage Collector!

                  A_Laxman wrote:

                  So its better that when you allocates memory inside the function then before returning allocated memory must deallocate. :)

                  Sometime its necessaey to allocate the Memory inside Function and Deallocated at Calling side, its wholly on design!.

                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                  cheers, Alok Gupta VC Forum Q&A :- I/ IV

                  L 1 Reply Last reply
                  0
                  • E Eytukan

                    ---Sorry for making it look like the SB ----

                    T Offline
                    T Offline
                    ThatsAlok
                    wrote on last edited by
                    #10

                    VuNic wrote:

                    Take your as* of my thread now, ****** if you dont understand what a "?" means, go join your kid and learn what's a "?", the perfect a**h*le I've ever seen.

                    Control you Anger Vunic!... thats doesn't suits you! and rest,leave it to Tox, he will handle it:)

                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                    cheers, Alok Gupta VC Forum Q&A :- I/ IV -- modified at 7:33 Tuesday 16th May, 2006

                    R N 2 Replies Last reply
                    0
                    • T ThatsAlok

                      VuNic wrote:

                      Take your as* of my thread now, ****** if you dont understand what a "?" means, go join your kid and learn what's a "?", the perfect a**h*le I've ever seen.

                      Control you Anger Vunic!... thats doesn't suits you! and rest,leave it to Tox, he will handle it:)

                      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                      cheers, Alok Gupta VC Forum Q&A :- I/ IV -- modified at 7:33 Tuesday 16th May, 2006

                      R Offline
                      R Offline
                      Rage
                      wrote on last edited by
                      #11

                      ThatsAlok wrote:

                      Control you Anger Vunic!...

                      Glad I am not the one surprised by this thread ! Never thought Vunic could "post" like that.

                      ThatsAlok wrote:

                      lets Tox to do the work

                      :laugh: :jig: ~RaGE();

                      T E 2 Replies Last reply
                      0
                      • P ppatel567

                        VuNic, Have you have simple common sense? Just write something sensible relevant to the matter of your post in the subject line than just "???" May be thats why you are just stuck with "C" :)) ppatel

                        T Offline
                        T Offline
                        ThatsAlok
                        wrote on last edited by
                        #12

                        ppatel567 wrote:

                        May be thats why you are just stuck with "C" :))

                        I believe, you might checkout his profile for same!:)

                        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                        cheers, Alok Gupta VC Forum Q&A :- I/ IV

                        1 Reply Last reply
                        0
                        • E Eytukan

                          Got it.Thanks !! :beer:


                          --[V]--

                          [My Current Status]

                          T Offline
                          T Offline
                          ThatsAlok
                          wrote on last edited by
                          #13

                          VuNic wrote:

                          Got it.Thanks !! :beer:

                          Is the coding in C itself or you can use C++ Classes there, if yes the try Auto_ptr :)

                          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                          cheers, Alok Gupta VC Forum Q&A :- I/ IV

                          E 1 Reply Last reply
                          0
                          • T ThatsAlok

                            VuNic wrote:

                            Take your as* of my thread now, ****** if you dont understand what a "?" means, go join your kid and learn what's a "?", the perfect a**h*le I've ever seen.

                            Control you Anger Vunic!... thats doesn't suits you! and rest,leave it to Tox, he will handle it:)

                            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                            cheers, Alok Gupta VC Forum Q&A :- I/ IV -- modified at 7:33 Tuesday 16th May, 2006

                            N Offline
                            N Offline
                            Nibu babu thomas
                            wrote on last edited by
                            #14

                            ThatsAlok wrote:

                            lets Tox to do the work

                            :~


                            Nibu thomas Software Developer Faqs by Michael dunn

                            T 1 Reply Last reply
                            0
                            • E Eytukan

                              ---Sorry for making it look like the SB ----

                              N Offline
                              N Offline
                              Nibu babu thomas
                              wrote on last edited by
                              #15

                              I had to give you a 1 for that.:sigh:


                              Nibu thomas Software Developer Faqs by Michael dunn

                              E 1 Reply Last reply
                              0
                              • N Nibu babu thomas

                                ThatsAlok wrote:

                                lets Tox to do the work

                                :~


                                Nibu thomas Software Developer Faqs by Michael dunn

                                T Offline
                                T Offline
                                ThatsAlok
                                wrote on last edited by
                                #16

                                Nibu thomas wrote:

                                ThatsAlok wrote:lets Tox to do the work:~

                                Don't you know about Tox?

                                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                                cheers, Alok Gupta VC Forum Q&A :- I/ IV

                                N 1 Reply Last reply
                                0
                                • R Rage

                                  ThatsAlok wrote:

                                  Control you Anger Vunic!...

                                  Glad I am not the one surprised by this thread ! Never thought Vunic could "post" like that.

                                  ThatsAlok wrote:

                                  lets Tox to do the work

                                  :laugh: :jig: ~RaGE();

                                  T Offline
                                  T Offline
                                  ThatsAlok
                                  wrote on last edited by
                                  #17

                                  Rage wrote:

                                  ThatsAlok wrote:lets Tox to do the work:laugh: :jig:

                                  Don't tell Tox about it, otherwise.....:)

                                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                                  cheers, Alok Gupta VC Forum Q&A :- I/ IV

                                  1 Reply Last reply
                                  0
                                  • T ThatsAlok

                                    Nibu thomas wrote:

                                    ThatsAlok wrote:lets Tox to do the work:~

                                    Don't you know about Tox?

                                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                                    cheers, Alok Gupta VC Forum Q&A :- I/ IV

                                    N Offline
                                    N Offline
                                    Nibu babu thomas
                                    wrote on last edited by
                                    #18

                                    ThatsAlok wrote:

                                    Don't you know about Tox?

                                    Is it little toxie?:~ If so what has he got to do with this!!:~


                                    Nibu thomas Software Developer Faqs by Michael dunn

                                    T 1 Reply Last reply
                                    0
                                    • T ThatsAlok

                                      VuNic wrote:

                                      Got it.Thanks !! :beer:

                                      Is the coding in C itself or you can use C++ Classes there, if yes the try Auto_ptr :)

                                      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                                      cheers, Alok Gupta VC Forum Q&A :- I/ IV

                                      E Offline
                                      E Offline
                                      Eytukan
                                      wrote on last edited by
                                      #19

                                      Thanks Alok!


                                      --[V]--

                                      [My Current Status]

                                      1 Reply Last reply
                                      0
                                      • T ThatsAlok

                                        A_Laxman wrote:

                                        In case of java there is special garbage collecter for deallocation of the memory during run time

                                        Sorry for Sounding Rude, this is not JAVA forum and C++ doesn't have Inbuild Garbage Collector!

                                        A_Laxman wrote:

                                        So its better that when you allocates memory inside the function then before returning allocated memory must deallocate. :)

                                        Sometime its necessaey to allocate the Memory inside Function and Deallocated at Calling side, its wholly on design!.

                                        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                                        cheers, Alok Gupta VC Forum Q&A :- I/ IV

                                        L Offline
                                        L Offline
                                        Laxman Auti
                                        wrote on last edited by
                                        #20

                                        Yaa Alok, Agreed ,even C# also provides Garbage Collector :) Knock out 'T' from CAN'T , You 'CAN' if you think you 'CAN' :cool:

                                        T 1 Reply Last reply
                                        0
                                        • N Nibu babu thomas

                                          ThatsAlok wrote:

                                          Don't you know about Tox?

                                          Is it little toxie?:~ If so what has he got to do with this!!:~


                                          Nibu thomas Software Developer Faqs by Michael dunn

                                          T Offline
                                          T Offline
                                          ThatsAlok
                                          wrote on last edited by
                                          #21

                                          Nibu thomas wrote:

                                          Is it little toxie?:~

                                          Don't say that, now little Toxie is CodeProject MVP.

                                          Nibu thomas wrote:

                                          If so what has he got to do with this!!:~

                                          I can't quote that in public:), every body that common to forum knows, what i intended to say!

                                          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                                          cheers, Alok Gupta VC Forum Q&A :- I/ IV

                                          E N 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups