Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Environments

In Brew MP, an environment (or Env) establishes an execution domain (or context) for each object in the system. Every object in the system reside in an Env. Objects residing in the same Env are considered local to each other and can be invoked and accessed directly from each other. They share the same privileges and access the same singleton instance created in the same Env.

Env manifests itself as an object that supports IEnv. When a class receives an IEnv pointer, it is the object that the IEnv pointer points to that determines the execution domain for the object of the class. For more information, see IShell and IEnv.

There is one Env per applet and per process (per kernel process). Brew MP supports multiple applets running in the same process, so each applet has its own Env, with its own privileges, which is separate from the Env of other applets in the same process. The Env determines the execution context for an applet. The memory protection domain is established by the Env of the process in which the applet resides, and therefore applets in the same process still share the same heap memory.