Described is a system and method that separates a managed code runtime
library or program into four parts, comprising a header, resources,
metadata and method implementations. The metadata and some or all of the
resources are maintained in system memory (RAM) the entire time that the
program is running. The method implementations and any non-maintained
resources are loaded on demand, and then discarded such as via garbage
collection. The amount of memory consumed by a managed code program is
thus reduced relative to non-separated environments, but because the
metadata and selected resources are in memory, the program execution is
highly efficient due to significantly reduced access of data in
non-volatile storage. The parts of the assembly that are maintained in
RAM can be saved as code library files, providing shared use by programs
and efficient loading by eliminating any need to again parse a program to
identify the separate parts.