Merged
Conversation
- 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`).
For issue #225 , currently it is done mostly for TX pipeline. RX related changes will be next. Introduced new memory related types: - `CanardMemoryAllocate` - `CanardMemoryDeallocate` - `CanardMemoryDeleter` - `CanardMemoryResource` Also: - prepare 4.0 semantic version - fix potential memory leak in tests
`canardTxPeek` now returns mutable item - needed for payload ownership transfer. --------- Co-authored-by: Sergei Shirokov <sshirokov@malwarebytes.com>
- eliminated struct/enum typedef-s - added migration guide
- added new `canaraTxPoll` and its `CanardTxFrameHandler` - updated migration guide
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



I want to keep the upcoming v4 changes on the main branch for visibility. We are not going to be publishing this release yet, though.
Changes:
Fixed issue canardMemFree must provide size #216 (Fixed issue #216 "canardMemFree must provide size" #233):
CanardTxQueueItemwith extraallocated_sizefield to remember original size allocated for the item (and its embedded payload).CanardRxTransferwith extraallocated_sizefield to report to the client original size allocated for the payload buffer (which is normally equal to sessionextent).New memory API for the TX pipeline only -- Implement memory resources like in LibUDPard #225 New
CanardMemoryResourcememory API #234 (not RX yet). Introduced new memory related types:CanardMemoryAllocateCanardMemoryDeallocateCanardMemoryDeleterCanardMemoryResourceFix potential memory leak in tests
Introduce CanardPayload Introduce
CanardPayloadetc #235struct CanardPayloadto combine payload size and data.struct CanardMutablePayloadto combine payload size, data andallocated_size.canardTxPeeknow returns mutable item - needed for payload ownership transfer.canardTxPeeknow returns mutable item #236Eliminated elaborated type typedefs. v4 typedefs and migration guide #237
Introduce deadline queue introduce deadline queue #sonar #238
Introduce TX polling helper v4 tx poll #239