#allocator

N-gated Hacker Newsngate
2025-10-16

🎩✨ Ah, the thrilling chronicles of kmalloc() and its trusty sidekick, the allocator! Forget the Avengers; this dynamic duo will leave you... yawning. 🤓💤 Canonical's very own superhero sustainer, armed with MIT-licensed wisdom, bravely delves into the abyss of , ensuring we all have a new story. 📚😴
ruffell.nz/programming/writeup

GripNewsGripNews
2025-09-08

🌗 Default musl allocator 拖慢效能,建議替換
➤ 揭開 musl 預設配置器效能瓶頸的真相
nickb.dev/blog/default-musl-al
作者發現使用 musl C 函式庫時,預設的記憶體配置器(allocator)在多執行緒環境下效能顯著下降,甚至造成 7 倍的減慢。透過替換為 mimalloc 或 jemalloc 等配置器,可大幅改善效能。儘管 musl 在建立靜態執行檔方面有優勢,但在效能敏感的應用程式中,替換預設配置器是個值得採取的步驟,即使目前不是 musl 目標環境。
+ 這篇文章深入探討了 musl 預設配置器的問題,替換成 mimalloc 的建議很有用。我自己的專案也遇到類似情況,換了之後效能改善很多。
+ 雖然我目前專案不是用 musl,但瞭解這個潛在問題很重要。感謝作者詳細的分析和實作建議。

Felix Palmen :freebsd: :c64:zirias@bsd.cafe
2025-07-09

Trying to further improve #swad, and as I'm still unhappy with the amount of memory needed ....

Well, this little and special custom #allocator (only dealing with equally sized objects on a single thread and actively preventing #fragmentation) reduces the resident set in my tests by 5 to 10 MiB, compared to "pooling" with linked lists in whatever #FreeBSD's #jemalloc serves me. At least something. 🙈

github.com/Zirias/poser/blob/m

The resident set now stabilizes at 79MiB after many runs of my somewhat heavy jmeter test simulating 1000 distinct clients.

2024-11-28

OSDEV: Разработка аллокатора на С++ часть 2: Слияние блоков за константное время. Юнит тест для аллокатора

Приветствую, уважаемый читатель! В первой части мы реализовали простейший аллокатор с минимальным оверхедом. Конечно же на самом деле все сложнее. Так реализация дефрагментации была наивной и не могла сливать блоки даже когда не было распределенных блоков после нескольких вызовов mem_free. Для того, что бы получить исходную картинку где будет только 2 служебных блока и один свободный нужно было бы вызвать mem_alloc с размером большим чем доступно памяти что бы искусственно запустить дефрагментацию. В этой части мы это исправим и напишем юнит тест для нашего аллокатора что бы убедится что он работает правильно.

habr.com/ru/articles/861930/

#распределение_памяти #allocator #memory_allocation #memory_management

Andrea Corbelliniandxor@mstdn.social
2024-09-23

This has been a crazy busy period for me, but finally last night I found some time to finish and publish a new #Rust #Crate: please welcome teaspoon, a compact memory allocator for environments with very limited memory!

docs.rs/teaspoon

Feedback is welcome.

#RustLang #memory #allocator

Nicolas Fränkel 🇪🇺🇺🇦🇬🇪frankel@mastodon.top
2024-05-09
Ivan Enderlin 🦀hywan@fosstodon.org
2024-03-01

It brings the following interesting features:

• Generally faster and/or more memory efficient than alternatives
• Scales better to multiple cores for some workloads than alternatives
• Custom Out-Of-Memory handlers for just-in-time heap management and recovery
• Supports creating and resizing arbitrarily many heaps
• Optional allocation statistics
• Partial validation in debug

#RustLang #memory #allocator

Ivan Enderlin 🦀hywan@fosstodon.org
2024-03-01

Talc, github.com/SFBdragon/talc.

A memory allocator built in Rust, for Rust. It is for embedded system, OS kernels or other no_std environments. It is also for WebAssembly.

#RustLang #memory #allocator

🎹 Tim Janik ✅timj@social.tchncs.de
2022-11-03

Wrote a #LockFree (and Obstruction-Free) memory #allocator for use in low-latency real-time threads.

Blocks are 64-byte aligned to avoid false sharing, alloc+free calls of the underlying Bucket- and Bump-Allocators are O(1).

A seperate thread is notified when the Bump-Allocator reaches a watermark. It will then extend the pool of pre-allocated (and pre-faulted) memory, so the Bump-Allocator can continue to serve requests concurrently without syscalls.

github.com/tim-janik/anklang/b
#Anklang

2021-01-10

#mastodon #sidekiq #ruby #memory #allocator

jemalloc > 2GB 😱
glibc malloc > 2GB 😱
mimalloc > 2GB 😱

3年前の記事に書かれていた"jemallocで解決"は今回の問題に対して適切ではなかったということ(´・ω・) スナ...

lime with videoscanlime@diode.zone
2020-12-19

chill software co-working // rustlang no_std slightly-alloc // 2020-12-18 diode.zone/videos/watch/496f7a

Ivan Enderlin 🦀hywan@fosstodon.org
2019-06-26

mimalloc, github.com/microsoft/mimalloc.

A compact, general-purpose, drop-in replacement for malloc, memory allocator.

Benchmarks show it always outperforms all other leading allocators (jemalloc, tcmalloc, Hoard…) and usually uses less memory.

#memory #allocator #research

Ivan Enderlin 🦀hywan@fosstodon.org
2019-03-19

bumpalo, a fast bump allocation area for Rust, github.com/fitzgen/bumpalo

#rustlang #memory #allocator

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst