This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

what dose "keep variables in order " do ?

My program is a bitter large.When I select "keep variables in order" which is located in the option of a project,my program will run
normally,though very slowly.Otherwise ,errors will occur.Why?
Thanks for your answer.

Parents
  • --What are corrupt pointers?

    If you have a valid pointer and do some math on it, say increment it past the end of the memory block it actually belongs to, you could call it a corrupt pointer.

    However, this is not a C term. Your pointer either points to valid memory (that is, what you expect it to), junk (someone else's memory), or null (nothing).

    - Mark

Reply
  • --What are corrupt pointers?

    If you have a valid pointer and do some math on it, say increment it past the end of the memory block it actually belongs to, you could call it a corrupt pointer.

    However, this is not a C term. Your pointer either points to valid memory (that is, what you expect it to), junk (someone else's memory), or null (nothing).

    - Mark

Children
  • Yes, by "corrupt pointer" I meant a pointer which points where it didn't oughta!
    It wasn't intended to be a specific 'C' term.

    Note that, with C51, a pointer specifies both an address and (either implicitly or explicitly) a memory area - DATA, XDATA, etc
    If the "corrupt" part of a "corrupt" pointer is the memory area, it could end up pointing into the stack - imagine what fun that can be...!

    You probably need to track this down in the simulator.