I am learning OSGi as it is becoming popular now a days. I am using linux as my OS and OpenJDK as development environment. I have created few bundles A,B,C.. etc in OSGi equinox framwork.
I run OSGi framework using below command:
java -jar osgi-3.10.0-v20140606-1445.jar -console
now I installed and started A,B,C .. etc bundle in OSGi console. using linux top command I have observed memory and CPU utilization as below:
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
1972 422 root S 368m 74% 3% java -jar osgi-3.10.0-v20140606-1445.jar -console
I observed that one of my bundle say B was causing high memory utilization. I uninstalled the bundle B from OSGi and again checked the memory usage. I found the same result with no change either in CPU usage or in memory usage.
I restarted the OSGi framework without bundle B then I found the below statistics
1972 422 root S 214m 43% 0% java -jar osgi-3.10.0-v20140606-1445.jar -console
So after this I came to know that uninstalling of bundle B from OSGi was not updating the memory or CPU usage until I restart the OSGi framework.
so can someone suggest me, how can I clean the memory after uninstallation of bundles in OSGi.