mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-24 10:44:51 +00:00
Merge pull request #134 from mapbox/fixshards
Round the number of threads to use down to a power of 2
This commit is contained in:
commit
a9ad1d99df
@ -70,6 +70,9 @@ void init_cpus() {
|
|||||||
CPUS = 1;
|
CPUS = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Round down to a power of 2
|
||||||
|
CPUS = 1 << (int) (log(CPUS) / log(2));
|
||||||
|
|
||||||
TEMP_FILES = 64;
|
TEMP_FILES = 64;
|
||||||
struct rlimit rl;
|
struct rlimit rl;
|
||||||
if (getrlimit(RLIMIT_NOFILE, &rl) != 0) {
|
if (getrlimit(RLIMIT_NOFILE, &rl) != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user