Memory Management Challenges

Monica discusses the complexities of concurrent mark and sweep garbage collection, highlighting how premature promotion of objects can lead to fragmentation. This occurs when free memory is available, but not in a contiguous block large enough for new allocations. To mitigate this issue, a fallback mechanism kicks in, involving a slower, single-threaded compaction process that handles the entire heap.