The JEP asks future OpenJDK releases to make several radical departures from traditional Java platform priorities: Simply put, this JEP may be just the magic that can “teach” HashMap (that lovable old dog) some new tricks. This article will survey the impact this JEP will have to empower the familiar Java HashMap with new off-heap capabilities. By comparison, if your heap exceeds main memory size, your machine will become unusable, possibly requiring power cycling. The benefit is collections that can grow much larger than traditional heap sizes and even larger than main memory size with trivial impact on pause times. Two collections that easily lend themselves to using arenas are Queue and HashMap as these have simple object life cycles, so having to write your own garbage collection is not too onerous. What off-heap offers is the capability to build “arenas” of memory storage that follow their own rules and don’t impact GC pause times. In some cases you want to avoid pause times altogether. On-heap memory works very well for millions of short-lived objects/values, however once you attempt to place additional requirements such as billions of objects/values, you have to be more creative if you want to avoid ever-increasing GC pauses. This facility has the capability to manipulate off-heap memory as efficiently as on-heap memory, but without some of the limitations on-heap memory usage brings. The OpenJDK off-heap JDK Enhancement-Proposal (JEP) seeks to standardise a facility that has been available as an internal-use-only API in HotSpot and OpenJDK from Java 6.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |