Java Tools

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            83 隨筆 :: 0 文章 :: 16 評論 :: 0 Trackbacks
          這個插件不錯,可以監視JVM的內存使用情況,并且可以強制GC工作。


          Current Version 1.0.0
          . Released Feb 1st 2004

          Description

          Cloudgarden's MemoryManager is a small plugin for IBM's Eclipse Java IDE, which displays the current memory usage of Eclipse (letting you know when Eclipse is close to using up all it's memory allowance), and automatically invokes garbage collection when deemed necessary by a simple but effective algorithm (see below), thus preventing or reducing times of forced inactivity while the Eclipse JVM cleans up it's virtual memory space.

          The plugin takes up little screen real estate, and provides a visual and numerical display of the free, total and maximum memory allocations, as well as indicating when it forced a garbage collection (it also has a button to manually force garbage collection). In the screen shot, the green region represents the free memory, the red region the used memory (which is equal to the total memory minus the free memory) and the black region represents space for expansion. The blue lines indicate when a garbage-collection happened. Scrolling of the display can be paused and re-started, and past values can be stepped through as a simple tool for analysing memory usage by applications in the workbench.

          The plugin is Open Source, (the source is here) and should work on most platforms (it has been tested on Windows, Linux and Mac).


          Download

          The plugin is contained in this file. Simply extract and install in your eclipse folder, then start eclipse.


          Usage

          Show the plugin by choosing "Windows->Views->Other->MemoryManager->Memory" in the eclipse main menu. The plugin will immediately start displaying memory usage and collecting garbage when necessary. Note: If total usage is less than half of the maximum allowed space, the display will be scaled vertically by a factor of two (ie, the height of the display represents only half of the maximum memory), but once the total memory excedes half of the maximum, the height represents the maximum allowed memory usage.


          Requirements

          Eclipse version 2.1.2 or 3M6. If run under a 1.3 JVM, the maximum memory cannot be calculated (since there is no such method in the 1.3 API), and the display will have no black area.


          Garbage collection algorithm


          1) At startup, or immediately after garbage-collection, find the free memory.
          2) Keep checking free memory every second or two.
          3) When the free memory drops below 75% of the free memory after the last garbage collection (or at startup), do another garbage-collection.

          That's it - simple, but apparently effective.
          posted on 2007-07-05 16:18 和田雨 閱讀(524) 評論(0)  編輯  收藏 所屬分類: Eclipse
          主站蜘蛛池模板: 丹寨县| 吴川市| 兴宁市| 南华县| 六枝特区| 九龙县| 探索| 新建县| 庆阳市| 南皮县| 长汀县| 永顺县| 桂东县| 西华县| 神农架林区| 洛浦县| 肇州县| 新乡市| 禹州市| 绥芬河市| 道真| 千阳县| 六枝特区| 垦利县| 扶余县| 鲁甸县| 信阳市| 台东市| 井冈山市| 彰化县| 巨野县| 班玛县| 辽宁省| 蒲城县| 翼城县| 虞城县| 南充市| 志丹县| 双柏县| 门源| 温泉县|