Patent ID: 7240341

Claim:
A method of reducing runtime memory requirements of a virtual machine in a computer system having associated computer memory, the method comprising: (a) compiling source code within the associated computer memory to create object code, the object code including a plurality of load-units; (b) applying the object code to a pre-load analysis engine to determine a number of load units; (c) determining a threshold number of occurrences for a threshold comparison in accordance with a processing time of the pre-load analysis engine to provide an adjusted threshold; (d) analyzing each load unit of the plurality of load-units of the object code for common constants; (e) enumerating the common constants found in step (d); (f) creating a global constant pool; (g) writing a value of the common constants to the global constant pool in accordance with a comparison of (i) the enumeration of step (e) and (ii) the adjusted threshold; (h) modifying references pointing at the common constants to point at the value written to the global constant pool; (i) removing each instance of the common constants from the load-units; and (j) operating the computer system in accordance with the removing.