Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make fossa friendlier for embedded systems #299

Open
4 tasks
cpq opened this issue Jul 6, 2015 · 4 comments
Open
4 tasks

Make fossa friendlier for embedded systems #299

cpq opened this issue Jul 6, 2015 · 4 comments
Assignees

Comments

@cpq
Copy link
Member

cpq commented Jul 6, 2015

FYI @danielinux & @maximevince

The primary fossa use case is embedded. However, when modules's functionality is getting extended, we unintentionally leak functions into the core, making it fatter. We need to make sure that our development does not increase core size, unless intended.

  • Disable all modules by default. Let user explicitly enable those which are needed
  • Make minimal fossa build on a small board (e.g. Arduino UNO)
  • Setup CI with embedded fossa build, making sure we're not bloating the code
  • No big objects on stack
@cpq cpq assigned mkmik Jul 6, 2015
@danielinux
Copy link

👍

@danielinux
Copy link

@cpq
I would also add:

  • Avoid placing big objects in the stack.

When big objects are placed in the stack of an embedded system, most likely it will result in a stack overflow. E.g., the struct ctl_msg has a default size of 8198 bytes (!) on 32-bit, and it's placed in the stack when entering ns_mgr_handle_ctl_sock.
I suggest to change the default size of stack objects - or even better - rework the code so that big objects are allocated onto the heap instead.

CC: @maximevince

@cpq
Copy link
Member Author

cpq commented Jul 14, 2015

Yep. Added that point.
I think that would be automatically done if CI on a small board.

@danielinux
Copy link

thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants