Skip to content
Low-Level AtlasKnowledge Atlas
Atlas Home

Entry Layer

Low-Level Index Start Here Must Know

Learning Path

00Orientation
Phase page
01Foundations13
Phase page
Machine Model13
Overview You are the runtime now The CPU: fetch–decode–execute & the clock Registers & the ISA The memory hierarchy Cache lines & locality Stack vs heap Bits, bytes, words & addresses Two's complement & integer representation Endianness IEEE 754 floating point How source becomes execution The process address space & virtual memory
02The C Layer30
Phase page
C from the Metal14
Overview Why C still matters — a thin layer over the machine The C type system is weak (and what that costs you) Undefined behavior: the contract you didn't know you si... More UB: signed overflow, aliasing, and sequencing The preprocessor: macros, includes, conditional compila... Translation units, declarations vs definitions, and lin... Arrays and array-to-pointer decay Structs, unions, and bitfields Strings are just `char*` (and the consequences) Integer promotions and implicit conversions The minimal standard library (libc essentials) Build and run a C program from zero (gcc/clang) Reading the C standard and cppreference
Pointers & Memory16
Overview What a pointer really is Pointer arithmetic & stride The stack: frames, locals & automatic storage The heap: malloc/free & the allocator underneath Pointers to pointers (double indirection) `void*` & type erasure Const-correctness and what `const` really promises Function pointers Struct layout: alignment & padding Data layout & cache-friendliness Strict aliasing & type punning Classic bug: use-after-free & double-free Classic bug: buffer overflow & out-of-bounds access Classic bug: memory leaks & ownership discipline Custom allocators: arena, pool & bump
03Down to the Metal27
Phase page
Assembly & Compiler Output13
Overview Why read assembly — Compiler Explorer as a daily tool x86-64 registers and the register file The core instruction set: `mov`, arithmetic, `lea` Addressing modes and memory operands Control flow: jumps, conditions, and the flags register The stack at the assembly level (`push`/`pop`, `rsp`/`r... Stack frames: function prologue and epilogue The System V AMD64 calling convention How C constructs compile: loops, structs, `switch` Optimization: what `-O2` does to your code Inline assembly (and when to reach for it) ARM64 appendix: AArch64 registers and calling convention
Toolchain & Linking14
Overview The pipeline: preprocess → compile → assemble → link Object files and what's inside them The ELF format (sections, segments, headers) Symbols: definition, reference, and resolution Static linking and archives (`.a`) Dynamic linking and shared libraries (`.so`) The dynamic loader, relocation, PLT and GOT gcc vs clang and the compiler driver model `make` and the build dependency graph `cmake` (when make isn't enough) gdb / lldb essentials for low-level debugging Sanitizers: ASan, UBSan, and TSan valgrind and profilers (perf, cachegrind)
04C++ (optional)13
Phase page
Modern C++13
Overview C vs C++: what you actually gain (and pay) RAII: the idea that changes everything Smart pointers: unique_ptr, shared_ptr, ownership Move semantics and value categories References, const, and overloading Templates and generic programming The STL: containers, iterators, algorithms Zero-cost abstractions (and where they leak) Modern C++ (11 → 23) highlights worth adopting Error handling: exceptions vs expected Which subset of C++ to use (and which to avoid) SerenityOS: an operating system written in C++
05Systems5
Phase page
Systems Programming4
Overview The syscall: crossing the boundary into the kernel Processes: fork, exec, and wait File descriptors and low-level I/O (`open`/`read`/`writ...
Concurrency & Performance1
Overview
06The Project1
Phase page
OS from Scratch1
Overview
★Always Active1
Phase page
Craftsmanship Low-Level1
Overview

Reference System

Registries1
Reference Registry
updated · 2026-07-19v0.1
⌘K
ENES
GitHub
Home/Low-Level/Phase 02 · The C Layer
phase~1 min readUpdated 2026-06-21#phase#c-layer

Phase 02 · The C Layer

C removes the safety net and hands you the machine. This phase is the dangerous, essential middle: the language's sharp edges, and the manual memory management that makes you responsible for every byte.

Read Next

  • C from the Metal
  • Pointers & Memory

Related notes

Low-LevelPhase 00 · OrientationWhere to start, what to ignore for now, and how the Low-Level Atlas is organized.Low-LevelPhase 01 · FoundationsHow the machine really works under the runtime — the mental substrate for everything that follows.Low-LevelPhase 03 · Down to the MetalReading the assembly your compiler emits, calling conventions, and the full preprocess→compile→assemble→link toolchain with its debuggers.Low-LevelPhase 04 · C++ (optional)The jump from C to C++ — RAII, smart pointers, move semantics, templates, and the STL. Optional, because the OS is C-first.

On This Page

Read Next Back to top