-
Notifications
You must be signed in to change notification settings - Fork 207
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_DeleteCDS: zero out block when freed #1340
Comments
Agreed. Behavior (not cleared) just needs to be clear in the documentation. |
Honestly I'm not even sure how to document this. Code should never use a block after deleting it, and there is never an assumption (or should never be an assumption) that memory will be cleared as part of a delete/free operation. It's a case where actually saying this might be more confusing than saying nothing at all.... because by definition the memory block is deleted ... it doesn't logically exist anymore, how can we document what the contents of something that doesn't exist are? |
Maybe just detail the fact the CDS entry gets deleted from the registry without modification to the actual memory block in the CDS (or whatever language is appropriate). This is helpful info for users that need to track write cycles. I don't see it as a case of code using the block after delete, it's detailing what the "delete" does which can be important to managing the hardware. |
Noted that this does not actually wipe or erase the block, it only returns resources to the pool for re-use.
Yeah, that can be done. I was thinking along the lines of "document what is in the memory buffer after a call to |
Fix #1340, update documentation for CFE_ES_DeleteCDS
Is your feature request related to a problem? Please describe.
Block not cleared when freed:
cFE/modules/es/fsw/src/cfe_es_cds.c
Line 883 in e80aae9
Describe the solution you'd like
Analyze, clear block if needed or document for future reference why it's not needed
Describe alternatives you've considered
None
Additional context
Code review
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: