摘要 |
Techniques for selectively promoting objects in a generational garbage collector are provided. Rather than using a single promotion policy, information about objects are used to determine and effectively enforce a suitable promotion policy for them. This information, for example, may be information about the general context under which the object is allocated or executed, or it may pertain to a particular operation, thread, function (or method) where garbage is likely to be generated and/or mostly garbage is generated. When it is determined that garbage is likely to be generated or mostly garbage is to be generated, a more suitable promotion policy can be enforced rather than a general (or normal). Objects are allocated using two or more memory allocators. Typically, objects that are likely to be garbage are allocated in a manner that effectively delays or bars their promotion to the next generation.
|