mirror of
https://github.com/facebook/zstd.git
synced 2025-08-05 19:15:58 +03:00
[pzstd] Reduce memory usage to 60-75% of previous
This commit is contained in:
@@ -61,7 +61,7 @@ static size_t handleOneInput(const Options &options,
|
|||||||
auto inputSize = fileSizeOrZero(inputFile);
|
auto inputSize = fileSizeOrZero(inputFile);
|
||||||
// WorkQueue outlives ThreadPool so in the case of error we are certain
|
// 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.
|
// we don't accidently try to call push() on it after it is destroyed.
|
||||||
WorkQueue<std::shared_ptr<BufferWorkQueue>> outs{2 * options.numThreads};
|
WorkQueue<std::shared_ptr<BufferWorkQueue>> outs{options.numThreads + 1};
|
||||||
size_t bytesWritten;
|
size_t bytesWritten;
|
||||||
{
|
{
|
||||||
// Initialize the thread pool with numThreads + 1
|
// Initialize the thread pool with numThreads + 1
|
||||||
|
Reference in New Issue
Block a user