Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to uninstall classLoader and hot deploy JVM

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article shows you how to uninstall classLoader and JVM hot deployment, the content is concise and easy to understand, can definitely make your eyes bright, through the detailed introduction of this article, I hope you can get something.

Unloading Mechanism of classLoader

Unload methods for class and classloader are not provided in jvm. What is the mechanism for hot deployment and osgi? The main idea is to change the classLoader to reload. The previous classloader and loaded class classes will be recycled in the case of gc in the perm area without instance references.

What is the process of recycling unreferenced class when gc in the perm area?

After the ◆ perm area reaches the recycling condition, the class is referenced and the class that is not referenced is recycled.

When will the ◆ classLoader instance be recycled? (it is very likely to enter old gen). In general, does perm zone recycling trigger full gc to clear that no instance references this classloader?

Memory problem

◆ if there is an instance class that has a reference to classloader, the perm area class cannot be uninstalled, causing the perm area memory to increase all the time, which leads to perm space error.

Public static Map pool = new HashMap (); public static void main (String [] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {for (int itemositani)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report