资源简介

用java模拟首次适应和最佳适应内存分配,能显示出内存分配情况,代码是NetBeans6.8工程,dist文件夹内有可运行的jar包

资源截图

代码片段和文件信息

/*
 * To change this template choose Tools | Templates
 * and open the template in the editor.
 */

package osgc;

import java.awt.Color;
import javax.swing.JLabel;

/**
 *
 * @author Administrator
 */
public class Block extends JLabel{
    private String name ;
    private String owner;
    private int number;
    private boolean available;
    public Block(){
        this.setOpaque(true);
        this.setBackground(Color.green);
        available = true;
        owner = ““;
    }

    public Block(int number){
        this();
        this.number = number;
        this.setText(number+““);
    }
    public boolean isAvailable() {
        return available;
    }

    public void setAvailable(boolean available) {
        if(available)
            this.setBackground(Color.green);
        els

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1462  2010-11-20 00:18  OsGc\build\classes\osgc\Block.class

     文件        506  2010-11-20 00:18  OsGc\build\classes\osgc\Main.class

     文件        721  2010-11-20 00:18  OsGc\build\classes\osgc\Mainframe$1.class

     文件        721  2010-11-20 00:18  OsGc\build\classes\osgc\Mainframe$2.class

     文件        632  2010-11-20 00:18  OsGc\build\classes\osgc\Mainframe$3.class

     文件        632  2010-11-20 00:18  OsGc\build\classes\osgc\Mainframe$4.class

     文件        524  2010-11-20 00:18  OsGc\build\classes\osgc\Mainframe$5.class

     文件       9115  2010-11-20 00:18  OsGc\build\classes\osgc\Mainframe.class

     文件       3707  2010-11-10 22:34  OsGc\build.xml

     文件      15780  2010-11-20 00:18  OsGc\dist\OsGc.jar

     文件       1443  2010-11-20 00:18  OsGc\dist\README.TXT

     文件         85  2010-11-10 22:23  OsGc\manifest.mf

     文件      37890  2010-11-10 22:34  OsGc\nbproject\build-impl.xml

     文件        475  2010-11-10 22:34  OsGc\nbproject\genfiles.properties

     文件          0  2010-11-10 22:34  OsGc\nbproject\private\config.properties

     文件        345  2010-11-10 22:34  OsGc\nbproject\private\private.properties

     文件        211  2010-12-04 15:58  OsGc\nbproject\private\private.xml

     文件       2022  2010-11-19 10:16  OsGc\nbproject\project.properties

     文件        512  2010-11-10 22:34  OsGc\nbproject\project.xml

     文件       1167  2010-11-19 12:19  OsGc\src\osgc\Block.java

     文件        325  2010-11-19 10:48  OsGc\src\osgc\Main.java

     文件       5820  2010-11-20 00:16  OsGc\src\osgc\Mainframe.form

     文件      11144  2010-11-20 00:16  OsGc\src\osgc\Mainframe.java

     目录          0  2010-11-20 00:18  OsGc\build\classes\osgc

     目录          0  2010-11-20 00:18  OsGc\build\classes

     目录          0  2010-11-20 00:18  OsGc\build\empty

     目录          0  2010-11-10 22:39  OsGc\nbproject\private

     目录          0  2010-11-19 10:42  OsGc\src\osgc

     目录          0  2010-11-20 00:18  OsGc\build

     目录          0  2010-11-20 00:18  OsGc\dist

............此处省略7个文件信息

评论

共有 条评论