-
Notifications
You must be signed in to change notification settings - Fork 204
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
CFE_ES_RegisterCDSEx: clear block if new allocation is needed but not new block size #1337
Comments
Looked into this code, its one of those areas where the original design appears to have evolved in a certain way, and so the "classic" behavior from old CFE versions was preserved. I went back to the requirements to see what it says, and only these three:
But none of these requirements say anything about "pre-clearing" the CDS block, and historically the code has not done this in either case (i.e. for new allocations or size changes). I can't say for sure why not, but most likely for these reasons:
My recommendation is to leave this as is, for the reasons above. Changing behavior is likely to have unintended side effects. |
Note in the documentation for this function that it is the responsibility of the calling app to clear/fill the CDS block any time a new block is allocated.
Fix #1337, add docs to CFE_ES_RegisterCDS() regarding clearing
Note in the documentation for this function that it is the responsibility of the calling app to clear/fill the CDS block any time a new block is allocated.
Fix nasa#1337, add docs to CFE_ES_RegisterCDS() regarding clearing
Is your feature request related to a problem? Please describe.
May need to clear block if a new allocation is needed without a changed block size
cFE/modules/es/fsw/src/cfe_es_cds.c
Line 383 in e80aae9
Describe the solution you'd like
Analyze, clear block if needed
Describe alternatives you've considered
If not needed, document why for future reference
Additional context
Code review
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: