Lines Matching refs:ramdisk
59 static yramdisk_Device ramdisk;
78 ramdisk.nBlocks = (SIZE_IN_MB * 1024 * 1024)/(16 * 1024);
80 ramdisk.block = YMALLOC(sizeof(yramdisk_Block *) * ramdisk.nBlocks);
82 if(!ramdisk.block) return 0;
84 for(i=0; i <ramdisk.nBlocks; i++)
86 ramdisk.block[i] = NULL;
89 for(i=0; i <ramdisk.nBlocks && !fail; i++)
91 if((ramdisk.block[i] = YMALLOC(sizeof(yramdisk_Block))) == 0)
106 YFREE(ramdisk.block[i]);
108 YFREE(ramdisk.block);
111 nAllocated/64,ramdisk.nBlocks * 528));
133 memcpy(ramdisk.block[blk]->page[pg].data,data,512);
142 memcpy(&ramdisk.block[blk]->page[pg].data[512],&pt,sizeof(pt));
164 memcpy(data,ramdisk.block[blk]->page[pg].data,512);
172 memcpy(&pt,&ramdisk.block[blk]->page[pg].data[512],sizeof(pt));
196 if(ramdisk.block[blk]->page[pg].data[i] != 0xFF)
211 if(blockNumber < 0 || blockNumber >= ramdisk.nBlocks)
218 memset(ramdisk.block[blockNumber],0xFF,sizeof(yramdisk_Block));