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

Fixed issue #216 "canardMemFree must provide size" #233

Merged
merged 5 commits into from
Nov 18, 2024

Conversation

serges147
Copy link
Contributor

@serges147 serges147 commented Nov 14, 2024

  • Extended CanardTxQueueItem with extra allocated_size field to remember original size allocated for the item (and its embedded payload).
  • Extended CanardRxTransfer with extra allocated_size field to report to the client original size allocated for the payload buffer (which is normally equal to session extent).

- Extended `CanardTxQueueItem` with extra `allocatd_size` field to remember original size allocated for the item (and its embedded payload).
- For RX pipeline we always know what was allocated for a payload - it's always equal to session `extent`.
@serges147 serges147 self-assigned this Nov 14, 2024
@serges147 serges147 added this to the v4.0 milestone Nov 14, 2024
Copy link
Member

@pavel-kirienko pavel-kirienko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples in the README should be updated to show how to use the new sized deallocations and, most importantly, how not to confuse payload_size and allocated_size.

Please bump the major version number! This would be v4.0

#define CANARD_VERSION_MAJOR 3
#define CANARD_VERSION_MINOR 3

@OpenCyphal OpenCyphal deleted a comment from pavel-kirienko Nov 18, 2024
@serges147
Copy link
Contributor Author

Please bump the major version number! This would be v4.0

Sure, I'll do this. Please note that I'm planning to keep whole this topic (and related to zero-copy issue changes) under temporary v4 branch - until all breaking changes required for this theme are done, and then release 4.0.0
Does it sound good?

@serges147 serges147 merged commit 1b318b3 into v4 Nov 18, 2024
17 checks passed
@serges147 serges147 deleted the sshirokov/v4_issue_216_free_size branch November 18, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants