summaryrefslogtreecommitdiff
path: root/plugins/dex
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-06-04 17:58:34 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-06-04 17:58:48 (GMT)
commit1f2b71e31326a5bc021785888cd2203010acf4e6 (patch)
treeb82fd64f1137a09553aa2cb513f974e1308e3022 /plugins/dex
parenta7f73441a0d466824798a421f369628db0184030 (diff)
Defined the number of threads to run from a centralized function.
Diffstat (limited to 'plugins/dex')
-rw-r--r--plugins/dex/pool.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/dex/pool.c b/plugins/dex/pool.c
index 1ed2c44..081c178 100644
--- a/plugins/dex/pool.c
+++ b/plugins/dex/pool.c
@@ -30,6 +30,7 @@
#include <i18n.h>
#include <core/global.h>
+#include <core/nproc.h>
#include <mangling/demangler.h>
@@ -201,7 +202,7 @@ bool load_all_dex_types(GDexFormat *format, wgroup_id_t gid, GtkStatusStack *sta
/* Lancement des chargements */
- runs_count = g_get_num_processors();
+ runs_count = get_max_online_threads();
run_size = count / runs_count;
@@ -362,7 +363,7 @@ bool load_all_dex_fields(GDexFormat *format, wgroup_id_t gid, GtkStatusStack *st
/* Lancement des chargements */
- runs_count = g_get_num_processors();
+ runs_count = get_max_online_threads();
run_size = count / runs_count;
@@ -731,7 +732,7 @@ bool load_all_dex_classes(GDexFormat *format, wgroup_id_t gid, GtkStatusStack *s
/* Lancement des chargements */
- runs_count = g_get_num_processors();
+ runs_count = get_max_online_threads();
run_size = format->header.class_defs_size / runs_count;