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

change * to ** in cfe_psp_memory.c #44

Closed
skliper opened this issue Sep 25, 2019 · 3 comments
Closed

change * to ** in cfe_psp_memory.c #44

skliper opened this issue Sep 25, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@skliper
Copy link
Contributor

skliper commented Sep 25, 2019

For improved efficiency consider changing 1st argument to be a double pointer of type void, and not a single pointer of type void. Then a straight assignment can be used in place of memcpy(used to copy 4 bytes). This will be an API change.

{{{
int32 CFE_PSP_WriteToCDS(void *PtrToDataToWrite, uint32 CDSOffset, uint32 NumBytes)
}}}
to
{{{
int32 CFE_PSP_WriteToCDS(void **PtrToDataToWrite, uint32 CDSOffset, uint32 NumBytes)
}}}
Need to assess this proposed change. Why was it implemented the way it was originally?

@skliper skliper self-assigned this Sep 25, 2019
@skliper
Copy link
Contributor Author

skliper commented Sep 25, 2019

Imported from trac issue 40. Created by sduran on 2015-09-03T11:25:53, last modified: 2019-08-14T14:13:14

@skliper
Copy link
Contributor Author

skliper commented Sep 25, 2019

Trac comment by jhageman on 2019-08-13 10:24:25:

Possible improved efficiency based on special case (4 byte copy) likely isn't enough to justify an API change. Consider writing a unique function (CFE_PSP_WriteToCDS_32bit or similar) if needed and benchmark against current implementation to justify use case.

@skliper skliper added the enhancement New feature or request label Sep 25, 2019
@skliper skliper assigned skliper and unassigned skliper Sep 26, 2019
@skliper skliper added the wontfix This will not be worked on label Oct 21, 2019
@skliper
Copy link
Contributor Author

skliper commented Oct 21, 2019

Memcpy is the general implementation to support variable size. Won't fix.

@skliper skliper closed this as completed Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant