-
chevron_right
Java proposal would scrap sun.misc.Unsafe memory access
pubsub.slavino.sk / infoworldcom · Wednesday, 31 January - 19:22 edit
The memory access methods of Java’s
sun.misc.Unsafe
class would be
deprecated for removal
in a future release of the platform, under a JEP (JDK Enhancement Proposal) afoot in the OpenJDK community. Of the class’s 87 methods, 79 would be removed.
These unsupported methods have had supported replacements since
JDK 9
, for accessing on-heap memory, and
JDK 22
, for accessing off-heap memory, the proposal states. Library developers are strongly encouraged to migrate from
sun.misc.Unsafe
to these supported replacements. Goals of the proposal include preparing for the removal of these memory access methods in a future Java release and helping developers know when their applications rely on them. It is not a goal of the proposal to remove the
sun.misc.Unsafe
class entirely, as a small number of its methods are not used for memory access and will remain undeprecated.
To read this article in full, please click here