This section addresses what a modern runtime can do to speed up memory management, going from impractical and "academic" algorithms to real world performance.
One technique, used in JRockit, that significantly speeds up object allocation is the concept of thread local allocation. It is normally much cheaper to allocate an object locally in a buffer in the running Java thread than going through the synchronized process of placing it directly on the heap. A naive garbage collector doing direct heap allocations would need a global heap lock for each allocation. This would quickly be the site for a nightmarish amount of contention. On the other hand, if each Java thread keeps a thread local object buffer, most object allocations may be implemented simply as the addition of a pointer, one assembly instruction on most hardware platforms. We refer to these thread local buffers as Thread Local Areas (TLA). The TLAs naturally have to processed...