-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously prepend_alloc would only try to allocate headspace if the empty space at the beginning of the buffer was available. This change maintains this as the preferred behavior but also allows for the possibility of moving existing data down the buffer if this will make the required space available. This change is motivated by the fact that the current behavior can lead to an exception being thrown if there are plenty of bytes available at the end of the buffer but not at the beginning. This can happen if .realign(0) is called on a buffer that will later have data prepended to it. Signed-off-by: Charlie Vigue <[email protected]>
- Loading branch information
Showing
2 changed files
with
74 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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