Merge remote-tracking branch 'upstream/dev' into single-file-lib

This commit is contained in:
Carl Woffenden
2020-04-07 11:13:02 +02:00
7 changed files with 119 additions and 39 deletions
+11
View File
@@ -257,6 +257,17 @@ MEM_STATIC size_t ZSTD_limitCopy(void* dst, size_t dstCapacity, const void* src,
return length;
}
/* define "workspace is too large" as this number of times larger than needed */
#define ZSTD_WORKSPACETOOLARGE_FACTOR 3
/* when workspace is continuously too large
* during at least this number of times,
* context's memory usage is considered wasteful,
* because it's sized to handle a worst case scenario which rarely happens.
* In which case, resize it down to free some memory */
#define ZSTD_WORKSPACETOOLARGE_MAXDURATION 128
/*-*******************************************
* Private declarations
*********************************************/