CcInitializeCacheMap

Hi, i am writing mini-filter driver, in which i am explicitly caching the file by using “CcInitializeCacheMap()”. Does system allocate space for this file, whenever we call this function or it happens at any other event(for that file)?

> Hi, i am writing mini-filter driver, in which i am explicitly caching the

file by using “CcInitializeCacheMap()”. Does system allocate space for
this file, whenever we call this function or it happens at any other
event(for that file)?

When CcInitializeCacheMap is called the system only initializes some system
structures used for caching.
Think what would have happened if the system had allocated the space for the
file and the file size is 2 GB and the system is 32 bits.
You should explicitly call CcCopyRead(Write) to read-write cached data, but
I can bet that your designt won’t work with all file systems unless you
manage file system objects yourself .


Slava Imameyev, xxxxx@hotmail.com

wrote in message news:xxxxx@ntfsd…
>
> Hi, i am writing mini-filter driver, in which i am explicitly caching the
> file by using “CcInitializeCacheMap()”. Does system allocate space for
> this file, whenever we call this function or it happens at any other
> event(for that file)?
>

>When CcInitializeCacheMap is called the system only initializes some system structures used for >caching.

But when disk space is actually allocated?

If you are asking these types of questions, you should do a lot of studying
before you consider using CcInitializeCacheMap. You do realize that you
need to manage the file object in your Mini-filter to use this call, in
other words you cannot pass most requests on to the file system, you have to
do the work. Get a copy of
https://www.osronline.com/custom.cfm?name=index_fullframeset.cfm&pageURL=https://www.osronline.com/store/index.cfm
and start studying.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

wrote in message news:xxxxx@ntfsd…
> >When CcInitializeCacheMap is called the system only initializes some
> >system structures used for >caching.
>
> But when disk space is actually allocated?
>