mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Adding dynamic memory allocation.
This commit is contained in:
+1
-1
@@ -78,7 +78,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
if(verbose) cout << "[verbose] loaded " << filename << " ("<< p.size() << " bytes)" << endl;
|
||||
ParsedJson pj;
|
||||
bool allocok = pj.allocateCapacity(p.size(), 1024);
|
||||
bool allocok = pj.allocateCapacity(p.size());
|
||||
if(!allocok) {
|
||||
std::cerr << "failed to allocate memory" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user