summaryrefslogtreecommitdiff
path: root/plugins/dex
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dex')
-rw-r--r--plugins/dex/pool.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/plugins/dex/pool.c b/plugins/dex/pool.c
index d95f519..fb710f3 100644
--- a/plugins/dex/pool.c
+++ b/plugins/dex/pool.c
@@ -77,9 +77,7 @@ bool load_all_dex_string_symbols(GDexFormat *format, wgroup_id_t gid, GtkStatusS
/* Lancement des chargements */
- runs_count = get_max_online_threads();
-
- run_size = count / runs_count;
+ run_size = compute_run_size(count, &runs_count);
queue = get_work_queue();
@@ -288,9 +286,7 @@ bool load_all_dex_types(GDexFormat *format, wgroup_id_t gid, GtkStatusStack *sta
/* Lancement des chargements */
- runs_count = get_max_online_threads();
-
- run_size = count / runs_count;
+ run_size = compute_run_size(count, &runs_count);
queue = get_work_queue();
@@ -447,9 +443,7 @@ bool load_all_dex_fields(GDexFormat *format, wgroup_id_t gid, GtkStatusStack *st
/* Lancement des chargements */
- runs_count = get_max_online_threads();
-
- run_size = count / runs_count;
+ run_size = compute_run_size(count, &runs_count);
queue = get_work_queue();
@@ -758,9 +752,7 @@ bool load_all_dex_methods(GDexFormat *format, wgroup_id_t gid, GtkStatusStack *s
/* Lancement des chargements */
- runs_count = get_max_online_threads();
-
- run_size = format->header.method_ids_size / runs_count;
+ run_size = compute_run_size(format->header.method_ids_size, &runs_count);
queue = get_work_queue();
@@ -898,9 +890,7 @@ bool load_all_dex_classes(GDexFormat *format, wgroup_id_t gid, GtkStatusStack *s
/* Lancement des chargements */
- runs_count = get_max_online_threads();
-
- run_size = format->header.class_defs_size / runs_count;
+ run_size = compute_run_size(format->header.class_defs_size, &runs_count);
queue = get_work_queue();