mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-09 22:38:05 +00:00
remove dyn alloc of thr_hashrates
This commit is contained in:
parent
3d3f2e2cb5
commit
d1966cc085
@ -230,7 +230,7 @@ pthread_mutex_t applog_lock;
|
|||||||
static pthread_mutex_t stats_lock;
|
static pthread_mutex_t stats_lock;
|
||||||
uint32_t accepted_count = 0L;
|
uint32_t accepted_count = 0L;
|
||||||
uint32_t rejected_count = 0L;
|
uint32_t rejected_count = 0L;
|
||||||
static double *thr_hashrates;
|
static double thr_hashrates[MAX_GPUS] = { 0 };
|
||||||
uint64_t global_hashrate = 0;
|
uint64_t global_hashrate = 0;
|
||||||
double global_diff = 0.0;
|
double global_diff = 0.0;
|
||||||
uint64_t net_hashrate = 0;
|
uint64_t net_hashrate = 0;
|
||||||
@ -504,6 +504,8 @@ void proper_exit(int reason)
|
|||||||
#endif
|
#endif
|
||||||
free(opt_syslog_pfx);
|
free(opt_syslog_pfx);
|
||||||
free(opt_api_allow);
|
free(opt_api_allow);
|
||||||
|
free(work_restart);
|
||||||
|
//free(thr_info);
|
||||||
exit(reason);
|
exit(reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2724,10 +2726,6 @@ int main(int argc, char *argv[])
|
|||||||
if (!thr_info)
|
if (!thr_info)
|
||||||
return EXIT_CODE_SW_INIT_ERROR;
|
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 */
|
/* init workio thread info */
|
||||||
work_thr_id = opt_n_threads;
|
work_thr_id = opt_n_threads;
|
||||||
thr = &thr_info[work_thr_id];
|
thr = &thr_info[work_thr_id];
|
||||||
|
Loading…
Reference in New Issue
Block a user