From: Nick Terrell Date: Wed, 21 Sep 2016 22:12:23 +0000 (-0700) Subject: [pzstd] Reduce memory usage to 60-75% of previous X-Git-Tag: v1.1.0~12^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c209a4febff1de239160bfdc0961b4b64eda16a;p=thirdparty%2Fzstd.git [pzstd] Reduce memory usage to 60-75% of previous --- diff --git a/contrib/pzstd/Pzstd.cpp b/contrib/pzstd/Pzstd.cpp index fceb49a7c..5dd84124d 100644 --- a/contrib/pzstd/Pzstd.cpp +++ b/contrib/pzstd/Pzstd.cpp @@ -61,7 +61,7 @@ static size_t handleOneInput(const Options &options, auto inputSize = fileSizeOrZero(inputFile); // WorkQueue outlives ThreadPool so in the case of error we are certain // we don't accidently try to call push() on it after it is destroyed. - WorkQueue> outs{2 * options.numThreads}; + WorkQueue> outs{options.numThreads + 1}; size_t bytesWritten; { // Initialize the thread pool with numThreads + 1