From 1c209a4febff1de239160bfdc0961b4b64eda16a Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Wed, 21 Sep 2016 15:12:23 -0700 Subject: [PATCH] [pzstd] Reduce memory usage to 60-75% of previous --- contrib/pzstd/Pzstd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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