Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a tail-recursive Angstrom.skip_many #172

Merged
merged 2 commits into from
May 3, 2022

Conversation

anmonteiro
Copy link
Owner

@ansiwen reported seeing a memory leak while testing a long-running H2 client.

image

This could lead to memory leaks that can look like:

image

@anmonteiro anmonteiro merged commit 1d4f6a1 into master May 3, 2022
@anmonteiro anmonteiro deleted the anmonteiro/tailrec-skip-many branch May 3, 2022 19:01
anmonteiro added a commit to anmonteiro/opam-repository that referenced this pull request Aug 15, 2022
…(0.9.0)

CHANGES:

- h2: Fix tests on 32-bit platforms
  ([anmonteiro/ocaml-h2#152](anmonteiro/ocaml-h2#152))
- h2-mirage: adapt to Conduit v4 and remove `H2_mirage.Server_with_conduit`
  ([anmonteiro/ocaml-h2#154](anmonteiro/ocaml-h2#154))
- h2: fix memory leaks related to trailer headers in the server and client
  implementations ([anmonteiro/ocaml-h2#159](anmonteiro/ocaml-h2#159)
  (thanks [@quernd](https://github.com/quernd)!),
  [anmonteiro/ocaml-h2#160](anmonteiro/ocaml-h2#160))
- h2: allow configuring `flush_headers_immediately` on the client and default
  to `false`. This means that h2 will wait for the first request body bytes to
  be scheduled and batch `HEADERS` and `DATA` frames when sending requests
  ([anmonteiro/ocaml-h2#163](anmonteiro/ocaml-h2#163),
  [anmonteiro/ocaml-h2#164](anmonteiro/ocaml-h2#164))
- h2: Split `Body.t` into `Body.Writer.t` and `Body.Reader.t`
  ([anmonteiro/ocaml-h2#165](anmonteiro/ocaml-h2#165))
- h2: OCaml 5.00 compatibility -- add `seeded_hash` to `scheduler.ml`
  ([anmonteiro/ocaml-h2#168](anmonteiro/ocaml-h2#168))
- h2: Use a tail-recursive version of `Angstrom.skip_many`. Fixes a memory leak
  in long-running connections e.g. gRPC
  ([anmonteiro/ocaml-h2#172](anmonteiro/ocaml-h2#172))
- h2-async: Add an OCaml-TLS client to `h2-async`
  ([anmonteiro/ocaml-h2#174](anmonteiro/ocaml-h2#174))
- h2: Fix a bug that caused different requests to share the same headers buffer
  under concurrency ([anmonteiro/ocaml-h2#182](anmonteiro/ocaml-h2#182))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant