You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** ... * @param realloc_if_needed Whether to reallocate and enlarge the JSON buffer to add padding. * @return An element pointing at the root of the document, or an error: * - MEMALLOC if realloc_if_needed is true or the parser does not have enough capacity, * and memory allocation fails. * - CAPACITY if the parser does not have enough capacity and len > max_capacity. * - other json errors if parsing fails. You should not rely on these errors to always the same for the * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). */inlinesimdjson_result<element>parse(constuint8_t*buf, size_tlen, boolrealloc_if_needed= true) &noexcept;
If the capacity is at least 64 bytes larger than the string size, it's safe to avoid the extra copy and set realloc_if_needed=false, as long as the 64 bytes are initialized memory (any value) (not sure which architectures this matters for)
The text was updated successfully, but these errors were encountered:
If the capacity is at least 64 bytes larger than the string size, it's safe to avoid the extra copy and set realloc_if_needed=false, as long as the 64 bytes are initialized memory (any value) (not sure which architectures this matters for)
The text was updated successfully, but these errors were encountered: