Skip to content
0:00 / 0:00

#handmadehero#memoryallocation#allocator

Handmade Hero Day 157 - Introduction to General Purpose Allocation

Molly Rocket

148K subscribers • 33 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Casey Muratori, creator of Handmade Hero
  • May be out of date. Uploaded 11 years ago, in an area where tools change fast.

Advanced. Deep dive for people who know the field.

43K views11 years ago1 recommendation

Systems programmingGame developmentMemory managementGame programmingC

Casey Muratori introduces the concepts and implementation of general-purpose memory allocation in C.

Day 157 of coding on Handmade Hero. See handmadehero.org for details.

Why it's here

1 person recommends this

What people say. Recommended for learning how memory allocators work and how to design custom allocation strategies.

u/jackdbdin r/Zig • Recommends

On “What is a allocator anyway?”

Think about these questions: 1. how much memory to allocate? 2. when to allocate it? 3. what to do when memory allocation fails? The answers to these questions are platform and architecture specific, and since one of the design goal of zig is to be compilable for any architecture, it cannot answer these questions for you. It's up to you to define an allocation strategy (i.e. answer to the questions above). Zig defines an interface that you can implement to allocate/deallocate memory. And in order to cover common use cases, Zig also provides several implementations of that interface. But since Zig exposes such interface to you, you always have the option to allocate/deallocate memory howev…