3 ms·
GC and AAA probably C#.
by npalli 2y ago
GC and AAA probably C#.
- mike_hearn 2y agoIf C# they'd have been using the MS authored GC. It was probably a custom GC for C++ heaps. Quite a few games do this, it's a smart productivity hack. Unreal uses a simple form of mark/sweep GC for its C++ game state heap. https://unrealcommunity.wiki/garbage-collection-36d1da https://unrealcommunity.wiki/garbage-collection-36d1da It works fine because most RAM in games is consumed by assets that don't need to be scanned.
- 60654 2y agoInteresting fact: Unity doesn't use a Microsoft GC, or the Microsoft implementation of CLR. They had integrated the competing Mono implementation early on, and it came with its own "stop the world" Boehm GC. They've been trying to move to Microsoft runtime for years but it's slow going.
- neonsunset 2y agoUnlikely. Though in the case of Unity, this can happen if you fail to uphold memory layout expectations when writing C/C++ code (or if you do something really bad in C#). There would also be a debugger allowing to reproduce and catch this in an easier way.