SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 allocator Open-Source Projects
-
rpmalloc
Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
memory
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
o1heap
Constant-complexity deterministic memory allocator (heap) for hard real-time high-integrity embedded systems. There is very little activity because the project is finished and does not require further changes.
-
Varena
Varena is a .NET library that provides a fast and lightweight arena allocator using virtual memory.
-
metamalloc
Single header template based general purpose memory allocation library for Linux & Windows. Repo also provides a live http memory profiler as a separate single-header with no dependencies
-
Arenas
Unmanaged arena memory allocators for C#/CSharp with easy interactions between managed and unmanaged references
-
allocator
Customisable, thread-safe C11 memory allocator based off the K&R "storage allocator" (by a-p-jo)
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
https://github.com/microsoft/snmalloc#snmalloc mentions two biggest motivations as:
> Allocations on one thread are freed by a different thread
I can imagine one use-case for this: a task that is scheduled from and executed by a work-stealing thread-pool can allocate memory in one thread but by design there's no guarantee that the memory will be necessarily freed from that exact thread. Would that be a good use-case for snmalloc?
> Deallocations occur in large batches
This sounds much like a bump allocator use-case but which can do this exact thing by calling a single munmap(addr, len) and unmap multiple allocations all at once.
Project mention: Non-code contributions are the secret to open source success | news.ycombinator.com | 2024-02-13Unit-tests are built into the language, as is comment-based documentation—put those two together and you get unit-tests as documentation examples built into the language; all it takes is to put a documentation comment (which can be blank) right before a `unittest` block after a declaration.
E.g. the examples for the D standard-library's `curry` function are just unit-tests: the docs: https://dlang.org/phobos/std_functional.html#quickindex.curr... the code: https://github.com/dlang/phobos/blob/42b8c65ccfd35c863f7cedf...
As a note, you might find some references to use wee_alloc, but it has been unmaintained for some time and shouldn't be used. I'm using the default allocator with the wasm32-wasi target and it works fine, but I don't know if that works with wasm32-unknown-unknown too; if not there's lol_alloc.
Project mention: I'm wanting to write my first compiler, but getting a little bit mixed up in general. | /r/Compilers | 2023-06-24Kind of an interpreter but it does compile to bytecode and is written in rust https://github.com/rust-hosted-langs/book I thought it was a great tutorial, both for learning rust, and about compilers
> I wish Rust would switch to mimalloc or the latest tcmalloc (not the one in gperftools).
That's nonsensical. Rust uses the system allocators for compatibility, not because they're good (they were not when Rust switched away from jemalloc, and they aren't now).
If you want to use mimalloc in your rust programs, you can just set it as global allocator, that takes all of three lines: https://github.com/purpleprotocol/mimalloc_rust#usage
Project mention: Talc – A fast and flexible allocator for no_std and WebAssembly | news.ycombinator.com | 2024-02-28Added a new issue [1] to add TLSF to the benchmarks as it's likely going to be faster in a single-threaded environment according to the rlsf crate [2].
[1] https://github.com/SFBdragon/talc/issues/26
Another one is https://github.com/xoofx/Varena
Arguably, there's less need for arenas in C# in most scenarios than in Go because of easy object and array pooling out of box with ArrayPool, ObjectPool (Sdk.Web workload) and stackalloc/InlineArray and co. You can also just use malloc/free directly with NativeMemory.Alloc/Free instead.
If you need a sub-allocator with predictable performance feel free to give it a try. The code is here and it is licensed under the 0BSD license, making it as lax and as close to public domain as possible. Comments, issues and PRs are always welcomed and appreciated. Thanks!
Project mention: Metamalloc: Single-header template based general purpose memory allocator lib | news.ycombinator.com | 2024-01-16
Never heard of this concept I found this
https://github.com/Enichan/Arenas
For C#.
Been trying to get into more managed memory in C#, so this might be something good for that.
Hey everyone! I recently created some memory allocators as a part of a mini-project. It's primarily made for educational purposes on this topic but if anyone is interested in using them and/or providing feedback here is a link to the repository. Thank you:)
allocator related posts
-
Nuke: A memory arena implementation for Go
-
Talc – A fast and flexible allocator for no_std and WebAssembly
-
Metamalloc: Single-header template based general purpose memory allocator lib
-
Snmalloc: A Message Passing Allocator
-
Memory Allocators
-
Rust + WASM + Typescript [+ React]
-
I'm wanting to write my first compiler, but getting a little bit mixed up in general.
-
A note from our sponsor - SaaSHub
www.saashub.com | 3 May 2024
Index
What are some of the best open-source allocator projects? This list will help you:
Project | Stars | |
---|---|---|
1 | rpmalloc | 2,015 |
2 | Mesh | 1,705 |
3 | snmalloc | 1,489 |
4 | memory | 1,441 |
5 | phobos | 1,172 |
6 | wee_alloc | 632 |
7 | book | 466 |
8 | mimalloc_rust | 449 |
9 | talc | 381 |
10 | embedded-alloc | 268 |
11 | o1heap | 215 |
12 | Varena | 155 |
13 | buddy_alloc | 120 |
14 | metamalloc | 100 |
15 | gpu-alloc | 85 |
16 | automem | 81 |
17 | Arenas | 77 |
18 | acid_alloc | 76 |
19 | Memory-Allocators | 22 |
20 | tcmalloc-rs | 16 |
21 | simple-chunk-allocator | 10 |
22 | allocator | 7 |
23 | c-allocators | 2 |
Sponsored