Tag
A classic technical article by Doug Lea describing the design goals, algorithms, and implementation considerations of dlmalloc, the widely-used public-domain malloc/free/realloc memory allocator that became the default in some Linux versions and many software packages.
A blog post doing 'Unix archaeology' on how early Unix versions (V4, 1973) handled memory allocation, from a primitive linear allocator using sbrk() to Dennis Ritchie's malloc()/mfree() map-based precursor in /usr/sys/dmr/malloc.c.
An in-depth look at the underlying implementation of Go's empty interface (any): the two-pointer structures of eface and iface, the meaning of the type word and data word, and how the compiler avoids unnecessary heap allocations through constants, zeroVal, staticuint64s, and other tricks.
A technical blog post explaining the double headed (bump) stack allocator, a classic fast memory allocation trick born from game animation programming at Surreal Software, where allocation is just an integer addition and deallocation resets the top-of-stack pointer.
A Rust engineering blog post arguing that parsing u64 values from byte slices should read in place using zero-copy techniques instead of allocating a Vec on the heap, showing how avoiding accidental heap allocations and syscalls yields zero-cost abstractions, illustrated with a binary command codec example.
jemalloc 5.4.0 has been released, an updated version of the general-purpose memory allocator emphasizing fragmentation avoidance and scalable concurrency, with source code and documentation available.
Go 1.27 introduces size-specialized memory allocation for allocations of 80 bytes or fewer, improving allocation speeds by 20-30% and overall program performance by up to 1% for allocation-heavy code.
This article provides a detailed comparison of arena architecture in malloc() algorithms, discussing memory allocation problems in multithreaded programs and the evolution of frontend and backend designs in memory allocators.
The article updates on the progress of stabilizing custom allocators in Rust, highlighting recent developments such as the Allocator trait becoming dyn compatible and efforts to address unsoundness issues.
A Rust library named israeli-alloc that allocates memory on a random victim program's address space, accompanied by a political statement about the Gaza crisis and a call for donations.
The article explains how the alloca function allocates memory on the stack by calling the __chkstk function to probe the stack before adjusting the stack pointer, demonstrated with x86-64 assembly code.
A blog post reveals a memory over-allocation bug in Zig's std.Io.Writer.Allocating due to the `drain` function incorrectly reserving space for the splat parameter on every data slice, causing unexpected memory growth.
This blog post details three recent optimizations to LLVM's BumpPtrAllocator, reducing fast-path overhead by removing redundant alignment, null pointer checks, and per-allocation accounting, resulting in improved performance for Clang, lld, and other LLVM components.
This video uses disassembly and the WinDbg debugging tool to reveal that the eight mystery bytes that appear when calloc allocates memory in an x86 environment are actually the entry header of the Windows heap manager, containing information such as the current block size and the previous block size.
Stumpalo is a new high-performance bump allocator for Rust that benchmarks significantly faster than existing alternatives like blink and bumpalo across a wide range of allocation operations. It also features scoped stack support and is available as a Rust crate.
This blog post explains the current double free detection mechanism in glibc malloc's per-thread tcache, identifies a flaw that allows cross-thread double frees, and proposes a potential fix using randomized keys per thread.
The article introduces Raven, a new State Space Model (SSM) with selective memory allocation that achieves state-of-the-art performance on recall tasks and demonstrates superior length generalization compared to existing models like SWA.