Patent ID: 8407681
Filing Date: 2013-03-26
Classification: G06F

Abstract:
1. A method for changing the initial size of a variable[y], where intermediate code contains a static method class[x] which in turn contains the initial size of variable[y], where a virtual machine interprets the intermediate code at runtime, said method comprising: said virtual machine creating, by a processor of a computer system, a plurality of instances of method class[x] in dynamic memory, each created instances in dynamic memory including the variable[y] having the initial size; said processor changing, during execution of the interpreted intermediate code, the size of the variable[y] for at least one instance of the plurality of instances of method class[x] in dynamic memory to a second size different from the initial size; in response to an occurrence of an initiating event, said processor searching the dynamic memory for said instances of method class[x] currently stored in the dynamic memory, said searching comprising finding the plurality of instances of method class[x] stored in dynamic memory; after said finding the plurality of instances of method class[x] stored in dynamic memory, said processor calculating a statistic, wherein the statistic is a function of a size of all instances of the variable[y] of the plurality of instances of method class[x] in the dynamic memory; after said calculating the statistic, said processor comparing the statistic with the initial size of variable[y] in the intermediate code; and after said comparing, said processor replacing the initial size of the variable[y] located in the static method class[x] in the intermediate code with a replacement size that depends on both the initial size and the statistic, for subsequent initializations of the static method class[x] by the virtual machine.