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

Array length changeable during Run - Time

Hi everyone

Does someone know how to change the length
of on array during the run time execution?
I mean how can I request memory to use
it for a array? Is there somthing like
malloc()?

Thanks!

Parents
  • "Is there somthing like malloc()?"

    To answer your question directly there is indeed something like malloc(): malloc(), in fact.

    However, as others have pointed out using malloc() is a bad idea in most 8051 situations. If you need dynamic allocation because your total memory requirements exceed your available memory then declare arrays as local variables within functions and let the overlay manager perform its magic.

Reply
  • "Is there somthing like malloc()?"

    To answer your question directly there is indeed something like malloc(): malloc(), in fact.

    However, as others have pointed out using malloc() is a bad idea in most 8051 situations. If you need dynamic allocation because your total memory requirements exceed your available memory then declare arrays as local variables within functions and let the overlay manager perform its magic.

Children