JDK-8038934 : Remove prefix allocated_ from methods and variables in Metaspace
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-04-01
  • Updated: 2014-07-29
  • Resolved: 2014-04-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
8u20Fixed 9 b10Fixed
From the beginning, there were only functions named used_in_bytes() and capacity_in_bytes(). These functions iterated over the ClassLoaderDataGraph to reach all metaspaces and then iterated over the chunk list.

Later, the functions allocated_used_bytes() and allocated_capacity_bytes() were added that used accounting to be able to return a value faster and without using a lock. When these were added, the functions used_bytes() and capacity_bytes() were renamed to used_bytes_slow() to capacity_bytes_slow() to clarify the difference (the slow functions were later made private).

Since the old, slow functions end in _slow, we can now drop the allocated_ prefix from the accounting functions.