summaryrefslogtreecommitdiff
path: root/src/analysis/disass
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/disass')
-rw-r--r--src/analysis/disass/area.c7
-rw-r--r--src/analysis/disass/disassembler.c5
2 files changed, 7 insertions, 5 deletions
diff --git a/src/analysis/disass/area.c b/src/analysis/disass/area.c
index 655d5af..c52934f 100644
--- a/src/analysis/disass/area.c
+++ b/src/analysis/disass/area.c
@@ -39,6 +39,7 @@
#include "../../common/sort.h"
#include "../../core/global.h"
#include "../../core/logs.h"
+#include "../../core/nproc.h"
#include "../../format/format.h"
#include "../../glibext/delayed-int.h"
@@ -1907,7 +1908,7 @@ mem_area *collect_memory_areas(wgroup_id_t gid, GtkStatusStack *status, GLoadedB
/* Lancement des traitements */
- runs_count = g_get_num_processors();
+ runs_count = get_max_online_threads();
collectors = (GAreaCollector **)calloc(runs_count, sizeof(GAreaCollector *));
@@ -2085,7 +2086,7 @@ void populate_fresh_memory_areas(wgroup_id_t gid, GtkStatusStack *status, mem_ar
icount = _g_preload_info_count_instructions(info);
- runs_count = g_get_num_processors();
+ runs_count = get_max_online_threads();
collectors = (GAreaCollector **)calloc(runs_count, sizeof(GAreaCollector *));
@@ -2236,7 +2237,7 @@ GArchInstruction **collect_disassembled_instructions(wgroup_id_t gid, GtkStatusS
/* Lancement des traitements */
- runs_count = g_get_num_processors();
+ runs_count = get_max_online_threads();
collectors = (GAreaCollector **)calloc(runs_count, sizeof(GAreaCollector *));
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c
index 0995b63..a88ba1e 100644
--- a/src/analysis/disass/disassembler.c
+++ b/src/analysis/disass/disassembler.c
@@ -38,6 +38,7 @@
#include "routines.h"
#include "../../arch/storage.h"
#include "../../core/global.h"
+#include "../../core/nproc.h"
#include "../../glibext/generators/prologue.h"
#include "../../plugins/pglist.h"
@@ -88,7 +89,7 @@ static void process_all_instructions(wgroup_id_t gid, GtkStatusStack *status, co
size_t end; /* Fin d'un bloc de traitement */
GInstructionsStudy *study; /* Tâche d'étude à programmer */
- runs_count = g_get_num_processors();
+ runs_count = get_max_online_threads();
g_arch_processor_lock(proc);
@@ -160,7 +161,7 @@ static void process_all_routines(wgroup_id_t gid, GtkStatusStack *status, const
sym_count = g_binary_format_count_symbols(format);
- runs_count = g_get_num_processors();
+ runs_count = get_max_online_threads();
run_size = sym_count / runs_count;