/* note : only works if no job is running ! */
static POOL_ctx* POOL_resize_internal(POOL_ctx* ctx, size_t numThreads)
{
- if (ctx->numThreadsBusy > 0) return NULL;
if (numThreads <= ctx->threadCapacity) {
ctx->threadLimit = numThreads;
return ctx;
/* init */
if (params.nbWorkers != mtctx->params.nbWorkers)
- ZSTDMT_resize(mtctx, params.nbWorkers);
+ CHECK_F( ZSTDMT_resize(mtctx, params.nbWorkers) );
if (params.jobSize == 0) {
params.jobSize = 1U << ZSTDMT_computeTargetJobLog(params);
return sequenceLength;
}
/* span extDict & currentPrefixSegment */
- DEBUGLOG(2, "ZSTD_execSequence: found a 2-segments match")
{ size_t const length1 = dictEnd - match;
- DEBUGLOG(2, "first part (extDict) is %zu bytes long", length1);
memmove(oLitEnd, match, length1);
op = oLitEnd + length1;
sequence.matchLength -= length1;
- DEBUGLOG(2, "second part (prefix) is %zu bytes long", sequence.matchLength);
match = prefixStart;
- DEBUGLOG(2, "first byte of 2nd part : %02X", *prefixStart);
if (op > oend_w || sequence.matchLength < MINMATCH) {
U32 i;
for (i = 0; i < sequence.matchLength; ++i) op[i] = match[i];