I’m working on a filter driver which redirects disk read/write request to a
file. I use memory mapped file to access file on disk. It works fine except
consuming a lot of memory upon intensive read/write. The memory release is
slow even after ZwUnmapViewOfSection. How can I return the memory to cache
manager after using it as soon as possible?
It seems that the memory is released only after the section and file are
closed. I tried MmFlushImageSection, CcPurgeCacheSection and CcFlushCache.
MmFlushImageSection just failed while CcPurgeCacheSection and CcFlushCache
cause system halt.
“Jin Ren” <ren.j> wrote in message news:xxxxx@ntfsd…
> I’m working on a filter driver which redirects disk read/write request to
a
> file. I use memory mapped file to access file on disk. It works fine
except
> consuming a lot of memory upon intensive read/write. The memory release is
> slow even after ZwUnmapViewOfSection. How can I return the memory to cache
> manager after using it as soon as possible?
>
>
></ren.j>