Merged
Conversation
Contributor
Author
|
Note: I explore reducing the scope of changes in this path by maintaining the buffer space. |
Cyan4973
reviewed
Mar 8, 2023
lib/compress/zstd_cwksp.h
Outdated
| if (ws->tableValidEnd < ws->tableEnd) { | ||
| ws->tableValidEnd = ws->tableEnd; | ||
| } } } | ||
| } } } |
Contributor
There was a problem hiding this comment.
nit: doesn't seem to be the proper bracket alignment
Cyan4973
reviewed
Mar 8, 2023
lib/compress/zstd_cwksp.h
Outdated
| * 2. Another initOnce buffer that has been allocated before (and so was previously memset) | ||
| * 3. An ASAN redzone, in which case we don't want to write on it | ||
| * For these reasons it should be fine to not explicitly zero every byte up to ws->initOnceStart. | ||
| * Note that we assume here tha MSAN and ASAN cannot run in the same time. */ |
Cyan4973
reviewed
Mar 8, 2023
lib/compress/zstd_compress.c
Outdated
|
|
||
| if (ZSTD_rowMatchFinderUsed(cParams->strategy, useRowMatchFinder)) { | ||
| /* Row match finder needs an additional table of hashes ("tags") */ | ||
| size_t const tagTableSize = hSize * sizeof(U16); |
Contributor
There was a problem hiding this comment.
Investigate if we really need U16 space for the tags table.
Contributor
Author
|
@Cyan4973 - see CR fixes |
Cyan4973
approved these changes
Mar 9, 2023
baefad5 to
70d69dc
Compare
- Adds memory type that is guaranteed to have been initialized at least once in the workspace's lifetime. - Changes tag space in row hash to be based on init once memory. - Moves buffers to aligned memory and removes the buffer memory type.
…o allocate them after aligned buffers
70d69dc to
f4aab97
Compare
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.
Part 1 of #3528
Update: now maintains the usage of unaligned buffers