Make your custom .NET GC — "whys" and "hows"
summary
.NET Core exposes Local GC so a custom GC library can replace the runtime GC by setting an environment variable and implementing the GC API (the GC version info and pointers to interfaces, ~75 methods for IGCHeap, handle manager, etc.). A minimal 0 GC uses VirtualAlloc and calloc to return zeroed native memory per object and survives 24k requests but leaks to ~300 MB; a bump-pointer allocator using 16 MiB segments reduces leak to ~200 MB and hits ~600–700 req/s.
AI-written summary · about
chapters (13)
- 0:00Intro
- 0:43Why custom NET GC
- 6:19Current implementation
- 9:18Hosting
- 11:50Tuning
- 15:17Usage
- 18:57Implementation
- 23:43Zero GC
- 30:45Repository
- 38:02Bump Pointer
- 43:46Allocation Contexts
- 47:11Why it works
- 51:57Next steps
related talks
57mWriting a custom, real-world .NET GC
01h 05mLook Mommy, No GC!
53mDebugging .NET Apps
01h 06m.NET Systems Programming Learned the Hard Way
01h 15mCSI .NET – Debugging .NET Applications
58mManual memory management in .NET Framework
01h 01mHidden gems in .NET Core 3
48mManual Memory Management in .NET Framework
