O'Reilly logo

Essential .NET, Volume 1: The Common Language Runtime by Chris Sells, Don Box

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

AppDomains and Code Management

Each AppDomain has its own private copy of a type's static data. An AppDomain may or may not need a private copy of the type's executable code, depending on any number of factors. To understand why this is the case, we first must look at how the CLR manages code.

AppDomains influence the way the JIT compiler works. In particular, the JIT compiler can generate code on either a per-process or a per-AppDomain basis. When all AppDomains in a process share machine code, the impact on the working set is reduced; however, raw invocation speed suffers slightly whenever a program accesses static fields of a type. In contrast, when the CLR generates machine code for each AppDomain, static field access is faster, but the working ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required