Bizarre memory leak caused by tokio runtime

This page summarizes the projects mentioned and recommended in the original post on /r/rust

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • jemallocator

    Rust allocator using jemalloc as a backend (by tikv)

    I was able to replicate the issue with the sample code, but not when using a different allocator (https://github.com/tikv/jemallocator). I understand the default allocator on Linux is malloc (https://doc.rust-lang.org/std/alloc/struct.System.html), and while looking up the differences between the two, it seems like jemalloc handles memory fragmentation much better (https://engineering.linkedin.com/blog/2021/taming-memory-fragmentation-in-venice-with-jemalloc). Maybe that's what's going on?

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • tokio

    A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

    This link specifically has more info on why the memory could creep up when you spawn a lot of tasks.

  • Mesh

    A memory allocator that automatically reduces the memory footprint of C/C++ applications.

    With everyone talking about memory fragmentation, I'd like to mention Mesh, an allocator that can compact aka defrag the heap without any help from the program or compiler. Here's the talk explaining it, "Compacting the Uncompactable" by Bobby Powers.

  • rkyv

    Zero-copy deserialization framework for Rust

    I had the same problem when trying to deserialize a big struct with rkyv: see rkyv#277.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Step-by-Step Guide to Server-Side Render React with Rust

    6 projects | dev.to | 2 Dec 2024
  • Async Rust in Three Parts

    3 projects | news.ycombinator.com | 23 Oct 2024
  • Declarative macro magic from Axum in Rust

    3 projects | dev.to | 9 Oct 2024
  • Zerocopy 0.8

    1 project | news.ycombinator.com | 9 Oct 2024
  • Encore.ts — 3x faster than ElysiaJS & Hono

    2 projects | dev.to | 1 Oct 2024

Did you konow that Rust is
the 5th most popular programming language
based on number of metions?