下面的Log是debug时候得到的调用过程:
0xd405de9c SDMEMORY!SMC_IOControl(unsigned long 0xd3f20f90, unsigned long 0x00075c08, unsigned char * 0xd3b78190, unsigned long 0x0000001c, unsigned char * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764) sdmemmain.cpp line 584
0xd405e070 DEVMGR!DM_DevDeviceIoControl(fsopendev_t * 0x00000000, unsigned long 0x00000000, void * 0xd405e764, unsigned long 0x00000000, void * 0x00000000, unsigned long 0x8c079bc0, unsigned long * 0x000005c9, _OVERLAPPED * 0x8ef79e50) devfile.c line 453 + 76 bytes
0xd405e0d8 KERNEL!MDCallKernelHAPI + 60 bytes
0xd405e128 KERNEL!NKHandleCall(unsigned long 0xd3b79da0, _DHCALL_STRUCT * 0xd405e138) apicall.c line 1983 + 40 bytes
0xd405e1a4 K.COREDLL!DirectHandleCall(unsigned long 0x00000007) coredll.cpp line 73 + 24 bytes
0xd405e1cc K.COREDLL!xxx_DeviceIoControl(void * 0x05c90003, unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764, _OVERLAPPED * 0x00000000) twinbase.cpp line 32 + 84 bytes
0xd405e22c MSPART!DoDiskIoControl(tagDriverState * 0xd3f22250, unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764, _OVERLAPPED * 0x00000000) part.h line 148 + 96 bytes
0xd405e270 MSPART!ReadPartition(unsigned long 0xd3f224f0, unsigned char * 0xd3b78190, unsigned long 0x0000001c, unsigned char * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764) part.cpp line 619 + 64 bytes
0xd405e2f0 MSPART!PD_DeviceIoControl(unsigned long 0xd3f224f0, unsigned long 0x00075c08, unsigned char * 0xd3b78190, unsigned long 0x0000001c, unsigned char * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764) part.cpp line 791 + 36 bytes
0xd405e398 FSDMGR!PartitionDriver_t::DeviceIoControl(unsigned long 0x00000000, unsigned long 0xd405e764, void * 0xc0d4b070, unsigned long 0x00000001, void * 0xd405e3c0, unsigned long 0xc0d4ade4, unsigned long * 0xd3f212d0) partition.hpp line 277 + 60 bytes
0xd405e3e8 FSDMGR!PartitionDisk_t::DiskIoControl(unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764, _OVERLAPPED * 0x00000000) partition.cpp line 216 + 68 bytes
0xd405e43c FSDMGR!StoreDisk_t::StoreIoControl(PartitionDisk_t * 0xd3f22590, unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764) storedisk.cpp line 1242 + 72 bytes
0xd405e498 FSDMGR!STG_DeviceIoControl(StoreHandle_t * 0x0000001c, unsigned long 0x00000000, void * 0x00000000, unsigned long 0xd405e764, void * 0xd3b78190, unsigned long 0x00000001, unsigned long * 0x00000000, _OVERLAPPED * 0x8fca08b8) stgapi.cpp line 697 + 68 bytes
0xd405e590 KERNEL!MDCallKernelHAPI + 60 bytes
0xd405e5e0 KERNEL!NKHandleCall(unsigned long 0x00000001, _DHCALL_STRUCT * 0x00000000) apicall.c line 1983 + 40 bytes
0xd405e65c K.COREDLL!DirectHandleCall(unsigned long 0x00000007) coredll.cpp line 73 + 24 bytes
0xd405e684 K.COREDLL!xxx_DeviceIoControl(void * 0x05cc0003, unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764, _OVERLAPPED * 0x00000000) twinbase.cpp line 32 + 84 bytes
0xd405e6e4 FSDMGR!FSDMGR_DiskIoControl(LogicalDisk_t * 0xd3f22590, unsigned long 0x00075c08, void * 0xd3b78190, unsigned long 0x0000001c, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0xd405e764, _OVERLAPPED * 0x00000000) fsdmgrapi.cpp line 623 + 52 bytes
0xd405e748 FSDMGR!ReadWriteDiskEx(_FSD_SCATTER_GATHER_INFO * 0xd405e7a0, _FSD_SCATTER_GATHER_RESULTS * 0x00000000, unsigned long 0x00075c08) fsdmgrapi.cpp line 748 + 76 bytes
0xd405e7a0 FSDMGR!FSDMGR_ReadDisk(LogicalDisk_t * 0xd3f22590, unsigned long 0x00484dc8, unsigned long 0x00000008, unsigned char * 0xd4061000, unsigned long 0x00001000) fsdmgrapi.cpp line 788 + 16 bytes
0xd405e7e8 EXFAT!Disk::ReadWriteDisk(unsigned long 0x00000009, unsigned long 0x00484dc8, unsigned long 0x00000008, unsigned char * 0xd4061000) disk.cpp line 179 + 48 bytes
0xd405e83c EXFAT!Volume::ReadVolume(unsigned long 0x00484dc8, unsigned long 0x00000008, void * 0xd4061000, unsigned long 0x00000009) volume.cpp line 1370 + 36 bytes
0xd405e864 EXFAT!Stream::ReadStreamData(unsigned __int64 0xd405e888d405e88c, void * 0x00000000, unsigned long 0x00000000, unsigned long 0x00000000, unsigned long * 0x00001000) stream.cpp line 324 + 36 bytes
0xd405e928 EXFAT!File::ReadFileData(unsigned __int64 0x0000000000001000, void * 0xd4061000, unsigned long 0x00001000, unsigned long * 0xd405ea70) file.cpp line 896 + 52 bytes
0xd405ea2c EXFAT!File::ReadFile(unsigned __int64 0x0000000000001000, void * 0xd4061000, unsigned long 0x00001000, unsigned long * 0xd405ea70) file.cpp line 134 + 36 bytes
0xd405ea60 EXFAT!FAT_ReadFileWithSeek(FileHandle * 0xd0675a90, void * 0xd4061000, unsigned long 0x00001000, unsigned long * 0xd405ec08, _OVERLAPPED * 0x00000000, unsigned long 0x00001000, unsigned long 0x00000000) api.cpp line 206 + 44 bytes
0xd405eab0 CACHEFILT!FilterHook_t::ReadFileWithSeek(unsigned long 0x00001000, void * 0x00000000, unsigned long 0x00000000, unsigned long * 0x00000040, _OVERLAPPED * 0xae1c2000, unsigned long 0x054f0006, unsigned long 0xd0ab0afc) fsdmgr.h line 515 + 60 bytes
0xd405eafc CACHEFILT!FSSharedFileMap_t::UncachedReadWriteWithSeek(void * 0xd4061000, unsigned long 0x00001000, unsigned long * 0xd405ec08, unsigned long 0x00001000, unsigned long 0x00000000, int 0x00000000) fssharedfilemap_uncached.cpp line 114 + 68 bytes
0xd405eba8 CACHEFILT!FCFILT_ReadWriteData(unsigned long 0xd0ab0c10, unsigned char * 0xd4061000, unsigned long 0x00001000, unsigned long * 0xd405ec08, const _ULARGE_INTEGER * 0xd405eccc, int 0x00000000) fssharedfilemap_cached.cpp line 152 + 56 bytes
0xd405ebec KERNEL!MAPPageInPage(_FSMAP * 0x8e0023a8, _ULARGE_INTEGER * 0xd405eccc, unsigned char * 0xd4061000) mapfile.c line 1599 + 56 bytes
0xd405ecac KERNEL!PageFromMapper(_PROCESS * 0x8c863bc0, unsigned long 0xd2a71000, int 0x00000000) mapfile.c line 1762 + 16 bytes
0xd405ed5c KERNEL!VMProcessPageFault(_PROCESS * 0x8c863bc0, unsigned long 0xd2a71a00, int 0x00000000) vm.c line 1207 + 24 bytes
0xd405edcc KERNEL!MDHandleHardwareException(_CALLSTACK * 0xd405f08c, _EXCEPTION_RECORD * 0xd405f03c, _CONTEXT * 0xd405ef48, unsigned long * 0xd405ee78) mdarm.c line 824 + 36 bytes
0xd405ee5c KERNEL!ExceptionDispatch(_EXCEPTION_RECORD * 0xd405f03c, _CONTEXT * 0xd405ef48) exdsptch.c line 930 + 20 bytes
0xd405ef48 KERNEL!CaptureContext + 44 bytes

=====================================================================================================================
从上面的调用过程中可以看出在:MAPPageInPage中使用了每次读取一个Page的操作,即一次4K。
这个操作就造成了SD卡的读取速度比较慢。
点赞  2009-3-6 14:44
学习了
点赞  2009-3-6 17:56
请教下 5.0和6.0的文件系统 有什么区别啊。。。我在做5.0移植到6.0   6.0的SD就是不好用~
点赞  2009-4-2 13:49
学习
点赞  2009-4-3 09:17
学习学习,我在ce5下读取SD卡时,用32768byte的Buf[]要比用8192的快很多,SD卡是Fat32格式的。
点赞  2009-6-16 04:12
学习中……,帮顶。
点赞  2009-6-16 09:04
uping
点赞  2009-8-6 10:30

诚聘winCE软件工程师

我司是专业上网本、UMPC、MID方案设计公司,因项目需要现诚聘winCE精英。

职务要求:
大专以上学历;
1年以上winCE软件开发经验;
熟悉winCE6.0系统定制开发者优先;
熟悉三星6410方案者优先;
待遇面谈,看工作经验5K-10K;

联系人:李生
电话:0755-26972802
QQ:68848678
工作地址:深圳南山科技园


点赞  2009-8-8 15:29
UP
点赞  2009-8-9 20:51
我遇到的问题是我的SD卡在上电后经常被格式化 望大侠指教
点赞  2009-8-9 20:56
mark
点赞  2009-8-10 09:22
正在开发wince上的应用,学习一下
点赞  2010-3-3 13:42
已经查明原因了。WinCE下的Cache功能导致这个问题,在文件读写的时候关闭Cache就可以了。
CreateFile的时候使用FILE_FLAG_NO_BUFFERING。
点赞  2010-4-11 13:56
123
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复