Skip to main content
This is lesson 12 of 15 in this module Course 72% complete

Make Long-Lived Objects Large

Premium Content

Sign in with your account or sign up to access this lesson.

The lesson shows how small objects that grow over time can end up being misclassified by the garbage collector, and explains how pre-sizing a list with an explicit capacity forces the runtime to allocate it directly on the large object heap, avoiding costly generation promotions.