Memory Allocators

Discussions center on the performance shortcomings of glibc's default malloc allocator, comparisons with alternatives like jemalloc, tcmalloc, mimalloc, and arena/bump allocators, and custom allocation strategies in C/C++.

➡️ Stable 0.7x Programming Languages
4,588
Comments
20
Years Active
5
Top Authors
#8162
Topic ID

Activity Over Time

2007
3
2008
15
2009
52
2010
36
2011
78
2012
69
2013
197
2014
196
2015
168
2016
225
2017
252
2018
253
2019
282
2020
422
2021
394
2022
415
2023
557
2024
338
2025
606
2026
30

Keywords

CS e.g allocsrv.ps vt.edu GC STL isocpp.org utexas.edu OS people.cs allocator malloc memory allocation rust arena glibc libc heap parameter

Sample Comments

hinkley Mar 19, 2025 View on HN

Is the glibc allocator still that bad? I thought they replaced that ages ago.

squid_demon Nov 26, 2020 View on HN

Maybe I'm missing something but it doesn't look like memory allocation was carefully considered in this library. For example, there are no custom allocators?

partycoder Oct 10, 2018 View on HN

Good for didactic purposes but in the real world you may want to try an allocator like tcmalloc or jemalloc.

hrpnk Apr 8, 2021 View on HN

Which memory allocator did you end up using?

senatorobama Sep 17, 2017 View on HN

What's the state of the art in memory allocation?

nyberg Feb 28, 2023 View on HN

How would it work with userspace memory allocators?

dochtman Jan 4, 2011 View on HN

Why is this not the default malloc shipped with libc's around the world yet?

vbezhenar Jan 19, 2022 View on HN

It's just a well known arena allocator pattern, implemented on OS level.

ancarda Aug 7, 2013 View on HN

As someone who has never touched C/C++ or managed their own memory, can you explain how other allocators work and how the performance differs from malloc?

gpderetta Oct 2, 2019 View on HN

The allocator in question runs in userspace.