Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ccp_priv_state takes up a lot more memory than it needs to #34

Open
fcangialosi opened this issue Sep 19, 2018 · 0 comments
Open

ccp_priv_state takes up a lot more memory than it needs to #34

fcangialosi opened this issue Sep 19, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@fcangialosi
Copy link
Member

currently, sizeof(struct ccp_priv_state) = 1952, which is dominated by assuming a maximum of 110 control registers and 110 report registers, which are each 8 bytes.

  1. This seems like way more than necessary. We could make this smaller by default and configurable as a kernel module option if someone needs an especially large program.

  2. Better yet, now that init_programs is only run once at the beginning, we could dynamically allocate the space for registers when programs are installed, that way we store exactly as much space for registers as we need.

@fcangialosi fcangialosi added the enhancement New feature or request label Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant