Let us zero the tail end.

This commit is contained in:
Daniel Lemire 2019-10-24 18:49:30 -04:00
parent 3484dda45e
commit 15740500af
1 changed files with 1 additions and 0 deletions

View File

@ -9,6 +9,7 @@ char *allocate_padded_buffer(size_t length) {
// However, we might as well align to cache lines...
size_t totalpaddedlength = length + SIMDJSON_PADDING;
char *padded_buffer = aligned_malloc_char(64, totalpaddedlength);
memset(padded_buffer + length, 0, totalpaddedlength - length);
return padded_buffer;
}