My experience from an extremely constrained embedded memory environment:
- Use fixed size buffers. Don’t use pointers or dynamic allocation because they have too much overhead.
- Use the smallest int data type that works.
- Don’t ever use recursion. Always use looping.
- Don’t pass lots of function parameters. Use globals instead. 🙂