mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
This commit is contained in:
+7
-1
@@ -74,7 +74,13 @@ bool ParsedJson::allocateCapacity(size_t len, size_t maxdepth) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
// We do not need to initialize this content for parsing, though we could
|
||||
// need to initialize it for safety.
|
||||
memset(string_buf, 0 , localstringcapacity);
|
||||
memset(structural_indexes, 0, max_structures * sizeof(uint32_t));
|
||||
memset(tape, 0, localtapecapacity * sizeof(uint64_t));
|
||||
*/
|
||||
bytecapacity = len;
|
||||
depthcapacity = maxdepth;
|
||||
tapecapacity = localtapecapacity;
|
||||
|
||||
@@ -72,6 +72,9 @@ really_inline bool is_valid_null_atom(const uint8_t *loc) {
|
||||
***********/
|
||||
WARN_UNUSED ALLOW_SAME_PAGE_BUFFER_OVERRUN_QUALIFIER LENIENT_MEM_SANITIZER
|
||||
int unified_machine(const uint8_t *buf, size_t len, ParsedJson &pj) {
|
||||
#ifndef ALLOW_SAME_PAGE_BUFFER_OVERRUN
|
||||
memset((uint8_t*)buf + len, 0, SIMDJSON_PADDING); // to please valgrind
|
||||
#endif
|
||||
uint32_t i = 0; // index of the structural character (0,1,2,3...)
|
||||
uint32_t idx; // location of the structural character in the input (buf)
|
||||
uint8_t c; // used to track the (structural) character we are looking at, updated
|
||||
|
||||
Reference in New Issue
Block a user