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

c program

hello;
i want to know that where we use link list, function pointer, generic pointer in embedded programming

Parents
  • where we use link list,

    Usually, not at all on small embedded systems (e.g. an 8051). The programmer should know how much memory is available and how much is needed in various parts of the application. Linked lists are intended for applications where neither the available memory nor the number of data items to be stored is known beforehand.

    function pointer,

    Should be avoided on '51s, since this architecture is particularly unsuited for using them. Otherwise, function pointers can speed up state machines (though a switch/case and explicit function calls do the same job and keep the program easier to read and to maintain).

Reply
  • where we use link list,

    Usually, not at all on small embedded systems (e.g. an 8051). The programmer should know how much memory is available and how much is needed in various parts of the application. Linked lists are intended for applications where neither the available memory nor the number of data items to be stored is known beforehand.

    function pointer,

    Should be avoided on '51s, since this architecture is particularly unsuited for using them. Otherwise, function pointers can speed up state machines (though a switch/case and explicit function calls do the same job and keep the program easier to read and to maintain).

Children