Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

leaf function

A function that calls no other function.

A leaf function makes no calls, so it need not save a link register, often needs no frame, and on System V x86-64 may keep locals in the red zone without moving rsp.

Examples

  • int sq(int x) { return x * x; } calls nothing, so it needs no stack frame.

Read the full section →