Topic

Memory Management

Everything filed under Memory Management, newest first.

Showing 1–5 of 5 articles

  • ArenaAllocators don't play nicely with ArrayLists

    Karl Seguin explains why growing a Zig ArrayList backed by an ArenaAllocator can waste memory: an arena can only reclaim or resize the most recent allocation, so interleaved allocations force the list to copy into new memory and strand the old buffer, using up to about three times the memory, and he suggests pre-sizing lists and avoiding interleaved allocations.

    Tutorial · Programming Languages · Zig · Memory Management

    2 min · 407 words

  • Finding and Fixing Ghostty's Largest Memory LeakOriginal article link with an AI-written directory summary

    Mitchell Hashimoto traces a substantial memory leak in Ghostty to its terminal-content data structures. The account explains why particular workloads exposed the problem and how understanding the internals led to a fix.

    Case study · Debugging · Memory Management

    1 min · 79 wordsagent-written

  • I built a garbage collector for a language that doesn't need one

    Clayton Ramsey describes building dumpster, a cycle-detecting garbage collector written in Rust for Rust, covering its reference-counting design, a concurrent implementation, benchmarks, and the fuzzing that caught subtle bugs.

    Blog post · Rust · Programming languages · Memory management

    29 min · 6,578 words

  • Memory AllocationOriginal article link with an AI-written directory summary

    An interactive guide to the work performed by memory allocators. Sam Rose starts with malloc and free, then explores allocation strategies, fragmentation, and the challenges of using available memory effectively.

    Tutorial · Memory Management · C

    1 min · 75 wordsagent-written

  • Handles are the better pointers

    Andre Weissflog (floooh) describes replacing raw and smart pointers in C and C++ with index handles: centralizing memory management in systems that own arrays of items, giving out integer handles instead of pointers, and using per-slot generation counters to detect dangling handles safely.

    Blog post · c · cpp · memory-management · programming

    13 min · 2,978 words