Go
69 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- 3.3 Go Build Processhistorical
Text files, executable build process, compilation, linking, Go bootstrap flow, startup flow, and references.
- 3.4 Memory Managementhistorical
Golang memory regions and the relationship between runtime.MemStats, RSS, heap, stack, HeapSys, HeapInuse, HeapIdle, and HeapReleased.
- 3.5 Plan 9 Assemblyhistorical
1. What Plan 9 assembly is 2. Registers 3. Instruction format 4. Basic instructions 5. Advanced instructions 6. Typical function stack frame 7. Usage 8. References
- 3.6 Memory Alignmenthistorical
Machine word length, memory addressing, alignment boundaries, why alignment is needed, data-structure alignment, address alignment, and references.
- 3.7 GChistorical
Go GC triggers, phases, tri-color marking, write barriers, observation, tuning, and memory reuse.
- 3.8 Golang Stack Managementhistorical
What the stack is, Go stack characteristics, dynamic growth, contiguous vs segmented stacks, and references.
- 3.9 Golang Heap Managementhistorical
Heap, heap memory layout, allocation units, mcache/mcentral/mheap, escape analysis, allocation flow, and references.
- 4.1 unittesthistorical
1. What it is Unit testing 2. Usage - filename xxx_test.go - import testing - function name must be TestXXX - run - go test . 3. References
- 4.2 pprofhistorical
1. What pprof is Golang performance analysis tool. 2. How to use pprof runtime/pprof, net/http/pprof, benchmark 3. How pprof works 4. References
- 4.3 benchmarkhistorical
How to write and run Go benchmarks, inspect memory allocations, and generate CPU, memory, block, trace, and mutex profiles.