mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Reduce maximum memory used for vertex sorting (#170)
* Add logging for out-of-memory debugging * Use less memory for sub-sorting * Reduce maximum memory used for vertex sorting
This commit is contained in:
@@ -4,12 +4,16 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#define MAX_MEMORY (10 * 1024 * 1024)
|
||||
#define MAX_MEMORY (1024 * 1024 * 1024) // 1 GB
|
||||
|
||||
void fqsort(std::vector<FILE *> &inputs, size_t width, int (*cmp)(const void *, const void *), FILE *out, size_t mem) {
|
||||
std::string pivot;
|
||||
FILE *fp1, *fp2;
|
||||
|
||||
if (mem > MAX_MEMORY) {
|
||||
mem = MAX_MEMORY;
|
||||
}
|
||||
|
||||
{
|
||||
// read some elements into memory to choose a pivot from
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user