Cleaned memory management for bitstream #41
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TOPIO/BigWhoop#41
Loading…
Reference in a new issue
No description provided.
Delete branch "develop-gws"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The goal of this PR is to guarantee untouched memory after the API changes take user-owned data and buffers.
As proposed in issue #36, memory (re-)allocations are avoided as possible.
terminate_stream
is wholly resolved and split into two functions:shrink_to_fit
andtransfer_to_span
.bwc_stream.codestream.data
can be removed too.bwc_compress
now returns the size of the compressed stream.I am going to review the code as soon as I have time to. However, I noticed that you still alter the arguments list in the comment block of a function. If this is done out of fidelity to the old comment block style you should consider using the new coding style that is referenced in the docs/template files to save you some time.
e6990686bc
to3242165d90
Function deliminator in bitstream.h and codestream.h are missing; please add them for the next pull request. Additionally, we are still allocating the bitstream structure - are we going to keep it this way or will we, in the future, pass a pointer for the corresponding struct to the init routine.
Other than that the changes are sensible.
Pull request closed