diff options
| -rw-r--r-- | src/nvim/os/wstream.c | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/src/nvim/os/wstream.c b/src/nvim/os/wstream.c index a3037e477b..5c10401958 100644 --- a/src/nvim/os/wstream.c +++ b/src/nvim/os/wstream.c @@ -9,6 +9,8 @@  #include "nvim/vim.h"  #include "nvim/memory.h" +#define DEFAULT_MAXMEM 1024 * 1024 * 10 +  struct wstream {    uv_stream_t *stream;    // Memory currently used by pending buffers @@ -43,6 +45,10 @@ typedef struct {  /// @return The newly-allocated `WStream` instance  WStream * wstream_new(size_t maxmem)  { +  if (!maxmem) { +    maxmem = DEFAULT_MAXMEM; +  } +    WStream *rv = xmalloc(sizeof(WStream));    rv->maxmem = maxmem;    rv->stream = NULL; | 
