diff --git a/main.cpp b/main.cpp index 8b7eddb82..e317da318 100644 --- a/main.cpp +++ b/main.cpp @@ -2041,7 +2041,7 @@ std::pair read_input(std::vector &sources, char *fname, i vertex_readers.push_back(readers[i].vertexfile); rewind(readers[i].vertexfile); } - fqsort(vertex_readers, sizeof(vertex), vertexcmp, vertex_out, memsize / 10, 0); + fqsort(vertex_readers, sizeof(vertex), vertexcmp, vertex_out, memsize / 20, 0); for (size_t i = 0; i < CPUS; i++) { if (fclose(readers[i].vertexfile) != 0) { @@ -2107,7 +2107,7 @@ std::pair read_input(std::vector &sources, char *fname, i rewind(readers[i].nodefile); } - fqsort(node_readers, sizeof(node), nodecmp, node_out, memsize / 10, 0); + fqsort(node_readers, sizeof(node), nodecmp, node_out, memsize / 20, 0); for (size_t i = 0; i < CPUS; i++) { if (fclose(readers[i].nodefile) != 0) { diff --git a/sort.cpp b/sort.cpp index de75d5e87..467466a5a 100644 --- a/sort.cpp +++ b/sort.cpp @@ -10,6 +10,7 @@ void fqsort(std::vector &inputs, size_t width, int (*cmp)(const void *, std::string pivot; FILE *fp1, *fp2; size_t first = 0, second = 0; + fprintf(stderr, "using maximum of %zu bytes of memory for sort\n", mem); { // read some elements into memory to choose a pivot from