1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-01-08 22:07:56 +00:00

remove dyn alloc of thr_hashrates

This commit is contained in:
Tanguy Pruvot 2015-04-24 12:12:45 +02:00
parent 3d3f2e2cb5
commit d1966cc085

View File

@ -230,7 +230,7 @@ pthread_mutex_t applog_lock;
static pthread_mutex_t stats_lock;
uint32_t accepted_count = 0L;
uint32_t rejected_count = 0L;
static double *thr_hashrates;
static double thr_hashrates[MAX_GPUS] = { 0 };
uint64_t global_hashrate = 0;
double global_diff = 0.0;
uint64_t net_hashrate = 0;
@ -504,6 +504,8 @@ void proper_exit(int reason)
#endif
free(opt_syslog_pfx);
free(opt_api_allow);
free(work_restart);
//free(thr_info);
exit(reason);
}
@ -2724,10 +2726,6 @@ int main(int argc, char *argv[])
if (!thr_info)
return EXIT_CODE_SW_INIT_ERROR;
thr_hashrates = (double *) calloc(opt_n_threads, sizeof(double));
if (!thr_hashrates)
return EXIT_CODE_SW_INIT_ERROR;
/* init workio thread info */
work_thr_id = opt_n_threads;
thr = &thr_info[work_thr_id];