Patent ID: 7792879

Claim:
A method comprising: calculating first and second allocation speeds respectively for at least a first space and a second space in a runtime environment's memory space; partitioning the runtime environment's memory space in proportion to said first and second space's respective allocation speeds so that the first space is filled to a first threshold level approximately at the same time as the second space is filled to a second threshold level, the partitioning for the first space performed dynamically according to the following formula: SpaceSize ⁢ ⁢ 1 = AllocSpeed ⁢ ⁢ 1 ( AllocSpeed ⁢ ⁢ 1 + AllocSpeed ⁢ ⁢ 2 ) * ( FreeSize ⁢ ⁢ 1 + FreeSize ⁢ ⁢ 2 ) + SurvivorSize ⁢ ⁢ 1 wherein: SpaceSize1: size of the first space, AllocSpeed1: allocation speed of the first space, AllocSpeed2: allocation speed of the second space, FreeSize1: free space size in the first space, FreeSize2, free space size in the second space, SurvivorSize1: used space size in first space; initiating a garbage collection process in the first space and the second space when the first threshold is met; and dynamically repartitioning the first and second spaces in proportion to said first and second space's respective allocation speeds after a garbage collection event is completed in both the first space and the second space.