14. A computer readable medium comprising executable instructions for garbage collection in a multitasking environment, wherein the executable instructions comprise instructions to: determine a plurality of old regions associated with an application; obtain a root for the application, wherein the root is for traversing an object graph of live objects for the application; create a mark bitmap by traversing the object graph using the root, wherein the mark bitmap describes a plurality of marked words for the plurality of old regions and a plurality of unmarked words for the plurality of old regions; create a connectivity matrix by traversing the object graph using the root, wherein the connectivity matrix describes a plurality of cross-region references; scan the mark bitmap to obtain fragmentation information; select a first region of the plurality of old regions; determine that the first region satisfies a fragmentation threshold using the fragmentation information; in response to determining that the first region satisfies the fragmentation threshold: copy at least one of the plurality of marked words located in the first region to a new region allocated from a pool of free regions; adjust a cross-region reference to the first region in the plurality of marked words to point to the new region based on the connectivity matrix; and add the first region to the pool of free regions; determine that a second region from the plurality of old regions does not satisfy the fragmentation threshold; in response to determining that the second region does not satisfy the fragmentation threshold, designate each of the plurality of unmarked words in the second region as free.
18. The computer readable medium of claim 14 , wherein determining that the first region satisfies the fragmentation threshold comprises determining that an average size of a continuous area of dead space in the first region and a proportion of live data in the first region satisfy the fragmentation threshold.