Default Application Domains in CLR

When CLR loads first to execute managed code, it creates 3 application domains.  System and Shared domains are singleton for each CLR.


Application Domains


System Domain

    • It creates and Shared and default application Domains.
    • It Loads Mscorlib.dll (class library for system namespace) into shared domain.
    • Creation of default Exception instances (OutOfMemoryException, StackOverFlowException and FatalExecutionException): the reason to create these exceptions in advance is that in case of above exceptions to be raise system needs to creates instance and memory, but say if it is outofmemory exception then there will be no space to instantiate exception instance.
    • It keeps track all the domains in the process and manage them by loading or unloading AppDomains.

    Shared Domain


    • It contains mscorlib.dll
    • It contains basic system types like class, array, struct etc.

    Default Domain


  • It contains user code and resources for only this app domain.
  • Name of default domain is name of executable.





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Powered by

Up ↑

%d bloggers like this: