Skip to content

wasi: use memory-tracking allocator

Rodrigo Muino Tomonari requested to merge github/fork/addaleax/wasi-changes into master

This addresses a TODO comment.


src: port memory-tracking allocator from QUIC repo

This implements a memory-tracking allocator that can be used to provide memory allocation facilities to several thread-safe C libraries, including nghttp2, nghttp3, ngtcp3 and uvwasi.

Refs: https://github.com/nodejs/quic/blob/34ee0bc96f804c73cb22b2945a1a78f780938492/src/node_mem.h Co-authored-by: @jasnell

http2: use shared memory tracking implementation

The extensive testing done on http2 makes it easier to make sure the implementation is correct (and doesn’t diverge unnecessarily).

Refs: https://github.com/nodejs/quic/pull/126 Reviewed-By: @danbev Reviewed-By: @jasnell

http2: track nghttp2-allocated memory in heap snapshot

WIP [upstream PR is open]

See https://github.com/cjihrig/uvwasi/pull/60

deps: update uvwasi

wasi: use memory-tracking allocator

This:

  • Protects against memory leaks in uvwasi.
  • Allows tracking the allocated memory in heap dumps.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading