Yu, Lau, and Wang have developed a memory management system called space-time efficient memory allocator (STEMA) for use in Java Virtual Machines. It is particularly effective for small memory devices. The paper defines the system and then compares it with a number of memory allocation/garbage collection algorithms implemented in the Jikes Research Virtual Machine (RVM). The improvements range from 2.1 percent to 28 percent in garbage collection time, when compared with other algorithms. The largest improvements occur for small memory devices, with small improvements for machines with large memories.
The algorithm is based on the concept of prolific types or objects. A prolific object is a small object that is frequently allocated. The memory system keeps statistics for each type, determining how many times an object is allocated. The statistics have built-in time decay so an object may be prolific at one point in the program and not at another. The authors observe a number of properties of prolific types and implement a memory management system to handle them efficiently.
When a prolific type is identified at runtime, all subsequent occurrences of this type are allocated in a reserved memory region. Since the objects have the same size, this area can be managed more efficiently. Allocation of an object typically reduces to incrementing a pointer; all of the objects can be deallocated together if they are no longer referenced.
The ideas in this paper have merit, particularly for small memory devices. There is one problem: the paper contains about ten pages of content, but takes 36 pages to express it.