Address Space and Memory Model
Virtual address width, page granularity, alignment and the ordering contract that lets x86-64, ARM64 and RISC-V programs agree on what a shared memory write means.
Virtual address width, page granularity, alignment and the ordering contract that lets x86-64, ARM64 and RISC-V programs agree on what a shared memory write means.
How a read-modify-write grabs a cache line exclusively, why LL/SC fails spuriously, and when a queue lock or futex beats a spinning test-and-set.
Bit and byte conventions, byte order, alignment and padding, and the object layout rules that decide what a binary format looks like.
The single-writer invariant, MESI and MOESI state machines, and why snooping gives way to directories as core counts grow.
The tag-index-offset split, direct-mapped versus set-associative lookup, line size and index translation, and the numbers that decide hit rate and hit time.
C 的抽象机器只有对象与函数:没有运行时、手工管理生命周期、以未定义行为换取零开销,用翻译单元与链接器拼装程序;本页给出这套模型的取舍与判断标准。
How the DRAM interface evolved from one 64-bit channel to DDR5 subchannels, stacked HBM, persistent DIMMs and CXL memory, and what each costs in latency and bandwidth.
The five unsafe abilities, the invariants they transfer to the developer, and the ABI contract at a foreign function boundary.
C++ 的移动语义:值类别、移动构造/赋值、转发引用、完美转发、RVO/NRVO 与 std::move 的误用。
RAII 用对象生命周期管理资源:规则 0/5、智能指针、异常安全与 scope guard。
Superseded by the Hardware domain; kept while its content moves into the new pages.
The capacity-latency ladder from registers to disk, the AMAT identity that prices it, and how locality turns a hundred-nanosecond miss into a one-nanosecond average.
How physical addresses are striped across channels, banks and ranks, why stride and granularity decide the achieved bandwidth, and how to measure the gap to the theoretical peak.
C++ 与外部世界的边界以 C ABI 为稳定层,pybind11、JNI 与 N-API 各自负责类型、所有权与异常的翻译,跨边界的字符串、容器与回调生命周期决定集成是否可靠。
C ABI 是各语言共同的最低边界:C++ 的 C 链接声明、cgo、ctypes/cffi、JNI、N-API 与 dlopen 各自把同一份调用约定翻译成本语言的对象,本页给出结构布局、所有权、错误映射与回调生命周期的判据。
What SC, TSO and the weak models allow, how store buffers make write-read reordering the default, and how acquire and release pin it back down.
Virtual memory, paging and segmentation: the address space, the page table and the cost of a miss.
The three Cs plus coherence, non-blocking caches and MSHRs, hardware and software prefetch, and cache blocking as the software answer to a working set that will not fit.
Private L1 and L2 behind a shared L3: what inclusive, exclusive and non-inclusive caches cost in effective capacity, snoop filtering and back-invalidation traffic.
Nodes, distance matrices and first-touch allocation: why a remote page costs 1.5 to 2 times a local one and how to bind CPU and memory together.
Fault classes and their costs, the kernel path that fills a missing PTE, and why the working set rather than RSS decides whether memory is enough.
The virtual-address split, the four- or five-level radix tree that maps it, and the PTE bits that carry protection, presence and dirty state.
How a set chooses the line to evict and how a write reaches the next level: LRU and its approximations, write-back versus write-through, and the traffic each choice costs.
The class file, the loading and linking phases, class loader hierarchy, reflection and the leaks a class loader can hold.
Runtime data areas, allocation, the garbage collectors compared, pause budgets and the OOM types that follow.
C 进程的地址空间由代码、数据、堆、栈与 TLS 组成,本页给出各段的边界、malloc 的实现与阈值、碎片和泄漏的判据以及分配器选型。
C++ 运行期内存:operator new/delete 的完整重载族、sized 与 aligned 分配、allocator 与 placement new、存储期与生命周期、std::launder 与 sanitizer 信号。
C 的 ABI 把对象布局、对齐、寄存器分配、结构体传递与变参协议固定成二进制契约,本页给出 SysV AMD64 与 Windows x64 的可验证规则和跨边界选择。
C++ 对象模型与 ABI:Itanium 与 MSVC 的名字修饰、vtable/vptr 与 RTTI 布局、多继承与虚继承的指针调整、ABI 稳定性以及 C 语言链接边界。
The two cells behind every level of the hierarchy: a 6T latch that holds a bit and a 1T1C capacitor that leaks one, with the density, timing and refresh contracts each imposes.
How a small translation cache turns a four-level walk into one lookup, why its reach matters more than its hit rate, and what a shootdown really costs.
C 的类型是对象表示、对齐与合法操作的组合:sizeof 与 offsetof 可算出布局,整数转换按秩与符号进行,数组在表达式里退化为指针,union 与位域则把可移植性押在实现上。
C++ 的静态类型系统:引用、cv 限定、auto/decltype 推导、转换序列、type traits 与类型类别。
Go 的值模型:基本类型与零值、显式转换和类型身份、常量与 iota 的求值、string/byte/rune 的 UTF-8 边界、slice 头的 len/cap、append 扩容与别名、map 的引用语义、struct 对齐填充、指针复制语义、可比较规则,以及逃逸分析如何决定栈或堆。
How CPython compiles and executes a module, how names bind to objects, how reference counting and the cyclic GC decide a lifetime, and how protocols decide identity, equality and attribute access.
One owner per value, borrows checked at compile time, and lifetimes that bound how long a reference stays valid.
Root and non-root CPU modes, two-dimensional paging with EPT or NPT, and the exit and nested-walk costs that set a guest apart from bare metal.