Lines Matching defs:ramdisk
55 static yflash_Device ramdisk;
73 ramdisk.nBlocks = (SIZE_IN_MB * 1024 * 1024)/(16 * 1024);
75 ramdisk.block = YMALLOC(sizeof(yflash_Block *) * ramdisk.nBlocks);
77 if(!ramdisk.block) return 0;
79 for(i=0; i <ramdisk.nBlocks; i++)
81 ramdisk.block[i] = NULL;
84 for(i=0; i <ramdisk.nBlocks && !fail; i++)
86 if((ramdisk.block[i] = YMALLOC(sizeof(yflash_Block))) == 0)
101 YFREE(ramdisk.block[i]);
103 YFREE(ramdisk.block);
106 nAllocated/64,ramdisk.nBlocks * YAFFS_BYTES_PER_BLOCK));
129 memcpy(ramdisk.block[blk]->page[pg].data,data,512);
137 memcpy(&ramdisk.block[blk]->page[pg].data[512],&pt,sizeof(pt));
159 memcpy(data,ramdisk.block[blk]->page[pg].data,512);
166 memcpy(&pt,&ramdisk.block[blk]->page[pg].data[512],sizeof(yaffs_PackedTags));
189 if(ramdisk.block[blk]->page[pg].data[i] != 0xFF)
204 if(blockNumber < 0 || blockNumber >= ramdisk.nBlocks)
211 memset(ramdisk.block[blockNumber],0xFF,sizeof(yflash_Block));