Skip to Content
.NET Common Language Runtime Unleashed
book

.NET Common Language Runtime Unleashed

by Kevin Burton
April 2002
Intermediate to advanced content levelIntermediate to advanced
1024 pages
23h 26m
English
Sams
Content preview from .NET Common Language Runtime Unleashed

Large Objects

You need to be aware of one more optimization. If an object is larger than 20,000 bytes, then it is allocated from the large object heap. The heap looks identical programmatically to the managed heap for smaller objects. An object in the large object heap ages through three generations, just like an object in the managed heap for small objects. The same rules apply for finalization of large objects as for small objects. The CLR makes one distinction in handling objects in the large object heap versus the managed heap for small objects: After objects in the large object heap are freed, the CLR does not try to compact the objects in the heap.

Two samples have been built in the LargeObject and LOC subdirectories that allocate a large ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Customizing the Microsoft® .NET Framework Common Language Runtime

Customizing the Microsoft® .NET Framework Common Language Runtime

Steven Pratschner

Publisher Resources

ISBN: 0672321246Purchase book