亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? filehdr.cpp

?? LINUX 下NACHOS 系統的頁面調度算法的實現
?? CPP
字號:
// filehdr.cc //	Routines for managing the disk file header (in UNIX, this//	would be called the i-node).////	The file header is used to locate where on disk the //	file's data is stored.  We implement this as a fixed size//	table of pointers -- each entry in the table points to the //	disk sector containing that portion of the file data//	(in other words, there are no indirect or doubly indirect //	blocks). The table size is chosen so that the file header//	will be just big enough to fit in one disk sector, ////      Unlike in a real system, we do not keep track of file permissions, //	ownership, last modification date, etc., in the file header. ////	A file header can be initialized in two ways://	   for a new file, by modifying the in-memory data structure//	     to point to the newly allocated data blocks//	   for a file already on disk, by reading the file header from disk//// Copyright (c) 1992-1993 The Regents of the University of California.// All rights reserved.  See copyright.h for copyright notice and limitation // of liability and disclaimer of warranty provisions.#include "copyright.h"#include "system.h"#include "filehdr.h"//----------------------------------------------------------------------// FileHeader::Allocate// 	Initialize a fresh file header for a newly created file.//	Allocate data blocks for the file out of the map of free disk blocks.//	Return FALSE if there are not enough free blocks to accomodate//	the new file.////	"freeMap" is the bit map of free disk sectors//	"fileSize" is the bit map of free disk sectors//----------------------------------------------------------------------boolFileHeader::Allocate(BitMap *freeMap, int fileSize){     numBytes = fileSize;    numSectors  = divRoundUp(fileSize, SectorSize);    if (freeMap->NumClear() < numSectors)	return FALSE;		// not enough space    for (int i = 0; i < numSectors; i++)	dataSectors[i] = freeMap->Find();    return TRUE;}//----------------------------------------------------------------------// FileHeader::Deallocate// 	De-allocate all the space allocated for data blocks for this file.////	"freeMap" is the bit map of free disk sectors//----------------------------------------------------------------------void FileHeader::Deallocate(BitMap *freeMap){    for (int i = 0; i < numSectors; i++) {	ASSERT(freeMap->Test((int) dataSectors[i]));  // ought to be marked!	freeMap->Clear((int) dataSectors[i]);    }}//----------------------------------------------------------------------// FileHeader::FetchFrom// 	Fetch contents of file header from disk. ////	"sector" is the disk sector containing the file header//----------------------------------------------------------------------voidFileHeader::FetchFrom(int sector){    synchDisk->ReadSector(sector, (char *)this);}//----------------------------------------------------------------------// FileHeader::WriteBack// 	Write the modified contents of the file header back to disk. ////	"sector" is the disk sector to contain the file header//----------------------------------------------------------------------voidFileHeader::WriteBack(int sector){    synchDisk->WriteSector(sector, (char *)this); }//----------------------------------------------------------------------// FileHeader::ByteToSector// 	Return which disk sector is storing a particular byte within the file.//      This is essentially a translation from a virtual address (the//	offset in the file) to a physical address (the sector where the//	data at the offset is stored).////	"offset" is the location within the file of the byte in question//----------------------------------------------------------------------intFileHeader::ByteToSector(int offset){    return(dataSectors[offset / SectorSize]);}//----------------------------------------------------------------------// FileHeader::FileLength// 	Return the number of bytes in the file.//----------------------------------------------------------------------intFileHeader::FileLength(){    return numBytes;}//----------------------------------------------------------------------// FileHeader::Print// 	Print the contents of the file header, and the contents of all//	the data blocks pointed to by the file header.//----------------------------------------------------------------------voidFileHeader::Print(){    int i, j, k;    char *data = new char[SectorSize];    printf("FileHeader contents.  File size: %d.  File blocks:\n", numBytes);    for (i = 0; i < numSectors; i++)	printf("%d ", dataSectors[i]);    printf("\nFile contents:\n");    for (i = k = 0; i < numSectors; i++) {	synchDisk->ReadSector(dataSectors[i], data);        for (j = 0; (j < SectorSize) && (k < numBytes); j++, k++) {	    if ('\040' <= data[j] && data[j] <= '\176')   // isprint(data[j])		printf("%c", data[j]);            else		printf("\\%x", (unsigned char)data[j]);	}        printf("\n");     }    delete [] data;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产女主播在线一区二区| 最新日韩在线视频| 亚洲国产精品av| 亚洲一级不卡视频| 国产激情精品久久久第一区二区 | 成人美女视频在线看| 色先锋aa成人| 日本一区二区三区dvd视频在线 | 成人免费在线视频| 老司机一区二区| 4hu四虎永久在线影院成人| 国产精品久久久久一区| 美女看a上一区| 欧美日韩在线播放一区| 中文字幕人成不卡一区| 国产成人午夜片在线观看高清观看| 精品视频在线免费| 亚洲一区av在线| 色综合久久综合网97色综合| 国产亚洲女人久久久久毛片| 免费看欧美女人艹b| 欧美精选在线播放| 亚洲影视资源网| 色综合天天狠狠| 亚洲视频在线一区观看| 国产成人午夜精品5599| 国产亚洲精品超碰| 国产一区二区三区免费播放| 日韩欧美不卡一区| 免费观看久久久4p| 欧美精品视频www在线观看| 一区二区三区四区不卡在线| 91在线视频播放地址| 中文字幕在线免费不卡| av午夜一区麻豆| 亚洲色图.com| 欧美三区免费完整视频在线观看| 亚洲日穴在线视频| 一本色道亚洲精品aⅴ| 亚洲同性gay激情无套| 99re66热这里只有精品3直播| 中文字幕va一区二区三区| 成人av网站免费| 成人免费视频在线观看| 色哟哟日韩精品| 亚洲一级在线观看| 欧美一二三在线| 国产毛片精品视频| 欧美极品少妇xxxxⅹ高跟鞋| 99re免费视频精品全部| 亚洲国产综合91精品麻豆| 欧美乱妇一区二区三区不卡视频| 视频在线观看一区| 久久日一线二线三线suv| 国产suv精品一区二区三区| 国产欧美一区二区精品忘忧草| 成人综合婷婷国产精品久久蜜臀| 亚洲视频在线一区观看| 欧美日韩久久不卡| 狠狠色狠狠色合久久伊人| 国产亚洲精品福利| 欧美视频中文字幕| 精品一区二区综合| 亚洲靠逼com| 日韩欧美一区二区久久婷婷| 大陆成人av片| 五月天久久比比资源色| 国产午夜精品久久久久久免费视| 色噜噜狠狠一区二区三区果冻| 蜜臀av在线播放一区二区三区 | 国产福利一区二区| 一区二区成人在线视频| 日韩欧美国产综合| 成人免费视频一区| 日韩av一级片| 亚洲图片欧美激情| 久久久综合视频| 欧美丝袜自拍制服另类| 国产福利一区二区三区视频| 亚洲第一成人在线| 国产精品美女久久久久久久网站| 欧美视频在线不卡| 99久久婷婷国产综合精品| 日本亚洲三级在线| 亚洲精品日韩一| 国产午夜精品一区二区| 91精品国产高清一区二区三区蜜臀| 成人午夜精品一区二区三区| 美日韩黄色大片| 亚洲国产一区二区三区| 中文字幕一区av| 久久综合九色综合97_久久久| 欧美区在线观看| 色哟哟国产精品| 国产福利不卡视频| 久久精品理论片| 石原莉奈在线亚洲三区| 亚洲婷婷综合色高清在线| 国产亚洲成aⅴ人片在线观看| 在线成人av网站| 欧美在线观看一二区| 99re免费视频精品全部| 成人黄色一级视频| 成人激情免费电影网址| 国产成人在线观看| 国产一区二区在线免费观看| 日韩成人午夜电影| 日一区二区三区| 天堂精品中文字幕在线| 亚洲一区二区美女| 五月婷婷激情综合网| 亚洲不卡在线观看| 日韩电影在线免费看| 视频一区二区国产| 麻豆精品在线播放| 久久国产成人午夜av影院| 久久精品理论片| 国产伦精品一区二区三区免费迷| 老司机免费视频一区二区| 美女看a上一区| 国产麻豆精品久久一二三| 国产一区二区三区不卡在线观看 | 26uuu久久综合| ww亚洲ww在线观看国产| 久久精品无码一区二区三区| 国产三级三级三级精品8ⅰ区| 国产精品入口麻豆原神| 国产精品国模大尺度视频| 国产精品二区一区二区aⅴ污介绍| 亚洲欧洲另类国产综合| 亚洲精品乱码久久久久久黑人| 亚洲在线观看免费| 日本中文字幕一区二区视频| 久久精品国产免费看久久精品| 国产一区二区导航在线播放| 成人激情动漫在线观看| 91黄色在线观看| 91精品国产入口| 久久精品一区二区| 亚洲欧洲色图综合| 天堂久久久久va久久久久| 精品一二三四区| 成人国产电影网| 6080日韩午夜伦伦午夜伦| 26uuu亚洲| 亚洲精品视频在线| 日韩经典一区二区| 成人午夜看片网址| 5月丁香婷婷综合| 国产三级欧美三级| 午夜欧美大尺度福利影院在线看| 久久99久国产精品黄毛片色诱| 成人午夜碰碰视频| 91精品国产综合久久福利| 国产女人18水真多18精品一级做| 亚洲综合区在线| 国产一区 二区| 欧洲av在线精品| 久久久久久黄色| 亚洲v精品v日韩v欧美v专区| 六月丁香婷婷久久| 在线观看国产一区二区| 久久久噜噜噜久噜久久综合| 一区二区三区影院| 国产成人精品午夜视频免费 | www.欧美日韩| 日韩欧美在线影院| 亚洲一区二区三区中文字幕| 国产麻豆一精品一av一免费 | 91视频在线观看免费| 精品国产伦一区二区三区免费| 亚洲影院在线观看| 99久久精品国产一区二区三区| 日韩精品一区二区三区在线观看 | 中文字幕欧美日韩一区| 日本色综合中文字幕| 欧美主播一区二区三区美女| 国产欧美日韩另类一区| 免费一级片91| 欧美精品久久一区二区三区| 亚洲欧美一区二区久久 | 欧美伊人久久久久久久久影院| 欧美激情在线一区二区| 精品一区二区影视| 91精品国产乱码| 天天爽夜夜爽夜夜爽精品视频| 91色视频在线| 中文字幕一区二区视频| 国产成人一区二区精品非洲| 精品sm捆绑视频| 理论电影国产精品| 精品三级在线看| 人禽交欧美网站| 日韩三级视频中文字幕| 日本女人一区二区三区| 正在播放亚洲一区| 日本大胆欧美人术艺术动态| 5858s免费视频成人| 蜜臀av一区二区三区| 日韩三级高清在线|