Managed code is code whose execution is managed by a runtime. In the MicroEJ case, the runtime is called MICROEJ VEE, whose centerpiece is a MEJ32 virtual processor, which defines a Common Language Infrastructure (Instruction Set + Memories + Tasks). The execution semantic remains the same, whatever the implementation. To achieve this portability, the MICROEJ VEE runtime implementation provides essential services, such as automatic memory management, security bounds, type safety, etc.
Managed code seats on top of the MICROEJ VEE, that provides hardware abstraction by leveraging virtualization. MICROEJ VEE provides a straightforward integration to the RTOS, firmware and the underlying hardware and allows for extensive simulation on desktop. Virtual prototyping accelerates the path to production, with functionalities tested and validated along the way with frequent interactions with stakeholders.
By providing support for containerized applications written in any language in a managed (or sandboxed) application, MicroEJ provides an industry-unique solution to manage and run applications in a safe and secure way. Sandboxed applications each have their memory space managed by the kernel, making it impossible for software components to crash the full system or device.
MicroEJ considered applications as untrusted by default. The MICROEJ VEE validates that an app will not jeopardize the system and is binary compatible with the rest of the applications it will be linked to. A security manager insures that apps will not be able to interact with the device critical functions, unless explicitly granted the right to.
The use of Managed Applications solves memory problem by allocating / deallocating memory areas automatically and safely through the Smart MMU, which dynamically defragments memory, collects unreferenced memory elements and prevents memory leakage.