Example #1
0
        public MemoryManage(ListView listView)
        {
            this.listView = listView;
            if (0 == IOStream.getInstance().Length)
            {
                initBoot();
            }

            datablock = (dataBlock[])IOFormatter.getInstance().Deserialize(IOStream.getInstance());
            node      = (inode[])datablock[3].data;
            blockMap  = (blockBitmap)datablock[2].data;
            nodeMap   = (inodeBitmap)datablock[1].data;
            listItems(workDir);
        }
        private void initBoot()
        {
            superBlock superblock = (superBlock)datablock[0].data;

            inode[]     node     = new inode[superblock.nodeNum];
            blockBitmap blockMap = new blockBitmap(superblock.blockNum);
            inodeBitmap nodeMap  = new inodeBitmap(superblock.nodeNum);

            datablock[1]      = new dataBlock();
            datablock[1].data = nodeMap;

            datablock[2]      = new dataBlock();
            datablock[2].data = blockMap;

            datablock[3]      = new dataBlock();
            datablock[3].data = node;
        }