Thread: Allocated memory is reset later part of the execution

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    145

    Allocated memory is reset later part of the execution

    Hi All,


    I have a issue, where i am able to allocate memory using the malloc. While printing in logs ,i am able to see the address being assigned as well.

    But When, like say 500ms into execution i can see it being reset.

    What steps can i follow to debug these kind of issue.
    Guys can suggest steps.

    I have tried with:
    Putting prints at points were it will be reset(reset after certain operation), it ain't hitting any of them.




    Thanks in advance.

  2. #2
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    What do you mean "reset". Your pointer has a different address stored? Can you post a small snippet of code that illustrates the problem?
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    A pointer that won't keep pointing! I hate that!!

    Last one of those I had, I put it into the dog house, with my German Shorthair Pointer, for a VERY long time! <grin>

  4. #4
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,834
    Is the pointer variable defined local to a function which has been exited? Is the pointer variable preceded by another - possibly array, which is being written to beyond its limited area?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Allocate memory inside allocated memory block?
    By Heidi_Nayak in forum C Programming
    Replies: 14
    Last Post: 04-15-2009, 04:19 PM
  2. Memory allocated
    By saswatdash83 in forum C Programming
    Replies: 2
    Last Post: 07-15-2008, 02:28 AM
  3. Size of allocated memory
    By TriKri in forum C++ Programming
    Replies: 8
    Last Post: 11-27-2006, 01:22 PM
  4. Memory not allocated??
    By Alexisa in forum C Programming
    Replies: 7
    Last Post: 09-24-2003, 11:19 PM
  5. reset memory pointer
    By muk_luk in forum C Programming
    Replies: 2
    Last Post: 09-10-2003, 03:43 PM