title: golang grpc transport.newBufWriter and bufio.NewReaderSize not releasing memory
body: <p>I have a simple grpc server in golang which does CRUD operations on an object. However, when I run it the memory never goes down even after requests stop. pprof of heap show has the following result:</p>
  
  <pre><code>&gt; flat  flat%   sum%        cum   cum%
  &gt;   932.39MB 62.45% 62.45%   932.39MB 62.45%  google.golang.org/grpc/internal/transport.newBufWriter
  &gt;   463.13MB 31.02% 93.46%   463.13MB 31.02%  bufio.NewReaderSize
  &gt;    13.50MB   0.9% 94.37%    13.50MB   0.9%  runtime.malg
  &gt;       13MB  0.87% 95.24%  1420.52MB 95.14%  google.golang.org/grpc/internal/transport.newHTTP2Server
  &gt;       11MB  0.74% 95.98%    12.10MB  0.81%  time.NewTimer
  &gt;     8.50MB  0.57% 96.54%     8.50MB  0.57%  golang.org/x/net/http2/hpack.(*headerFieldTable).addEntry
  &gt;     5.50MB  0.37% 96.91%    17.60MB  1.18%  google.golang.org/grpc/internal/transport.(*http2Server).keepalive
  &gt;     3.50MB  0.23% 97.15%     7.50MB   0.5%  google.golang.org/grpc/internal/transport.newLoopyWriter
  &gt;     1.50MB   0.1% 97.25%    12.50MB  0.84%  google.golang.org/grpc.(*Server).serveStreams
  &gt;          0     0% 97.25%       10MB  0.67%  golang.org/x/net/http2.(*Framer).ReadFrame
  </code></pre>
  
  <p>Can anyone guide me on how to go about fixing this memory issue? The server runs with default options and I have even enabled debug.FreeOSMemory() function to release memory.</p>