‹ BackHN Continuity

Thread

Comparison of Malloc() Algorithms

144 points · 51 comments · egberts1

  1. brcmthrowaway · · focus · HN ↗
    What malloc does macOS use in userspace? How about kernel?
    1. egberts1 · · focus · HN ↗
      In NextSTEP 3, it was zoned-based allocation.

      Rhapsody and early MacOS X, Darwin also used zone-based

      Early iPhone also zone-based.

      Later MacOS X implemented scalable zone, magazine allocator.

      iPhone 12+ then went Nano allocator, ScalableZone + large/VM allocator

      Latest iOS/iPadOS use Nano2

      1. ddcc7 · · focus · HN ↗
        NanoV2 was only used for smaller size classes. The current allocator is xzone malloc: <a href="https:&#x2F;&#x2F;github.com&#x2F;apple-oss-distributions&#x2F;libmalloc&#x2F;blob&#x2F;main&#x2F;doc&#x2F;xzone_malloc.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;apple-oss-distributions&#x2F;libmalloc&#x2F;blob&#x2F;ma...
        1. egberts1 · · focus · HN ↗
          Thanks, I needed that!
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.