Resources | Resources |



Module characteristics

Modules can have the following characteristics:

  • Shareable or non-shareable

    A shareable module is a dynamic module that can be loaded into kernel memory and shared with other processes. In doing so, the process is granted read and execute privileges to the kernel memory containing the dynamic module's code and read-only data. To be considered shareable, a dynamic module must not contain any writable data.

    If a module is non-shareable, a copy of the module is loaded into each environment.

  • Const or non-const

    A dynamic module is considered Const if it resides in the const file system. This is determined by calling IFileSystem2_Stat(). If both the MIF and Module File are contained in the const file system, the module is Const and no signature check is required.

  • Common

    A common module contains one or more applications that share the same read-write data at the same time. Within a process, loaded Brew MP modules are shared between environments.

    Note: A module cannot be both shareable and common.

A module that is non-shareable and non-common is referred to as unique. Each environment loads its own copy of a unique module.

The module type and its characteristics determine how OS Services loads a module from the file system and stores it in RAM:

Module type Characteristics it can have
MOD Always non-shareable and common. Can be const or non-const.
DLL Always non-shareable and common. (Loading one per process is simulated.)
MOD1 Can be shareable or non-shareable, const or non-const. Cannot be common.
DLL1 Always shareable and non-const.