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
          主站蜘蛛池模板: 浦县| 班玛县| 泾阳县| 长宁区| 文成县| 桐柏县| 昌吉市| 明水县| 松原市| 巴南区| 通渭县| 湘西| 齐齐哈尔市| 澄城县| 临清市| 桐梓县| 尖扎县| 都江堰市| 岐山县| 建水县| 临沭县| 桃源县| 平原县| 屏东县| 刚察县| 顺昌县| 化德县| 白玉县| 徐州市| 城口县| 白城市| 工布江达县| 婺源县| 黔西县| 沁源县| 凤城市| 大同县| 本溪市| 虹口区| 和林格尔县| 沙湾县|