1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 13:04:29 +00:00

Add an extra slot in the max backlog for ztex to minimise dupes.

This commit is contained in:
Con Kolivas 2012-11-24 12:41:35 +11:00
parent 31e43944bc
commit 14e169b29f

View File

@ -229,7 +229,8 @@ static int64_t ztex_scanhash(struct thr_info *thr, struct work *work,
} }
memset(lastnonce, 0, sizeof(uint32_t)*ztex->numNonces); memset(lastnonce, 0, sizeof(uint32_t)*ztex->numNonces);
backlog_max = ztex->numNonces * (1 + ztex->extraSolutions); /* Add an extra slot for detecting dupes that lie around */
backlog_max = ztex->numNonces * (2 + ztex->extraSolutions);
backlog = malloc(sizeof(uint32_t) * backlog_max); backlog = malloc(sizeof(uint32_t) * backlog_max);
if (backlog == NULL) { if (backlog == NULL) {
applog(LOG_ERR, "%s: failed to allocate backlog[%d]", ztex->repr, backlog_max); applog(LOG_ERR, "%s: failed to allocate backlog[%d]", ztex->repr, backlog_max);