From: Stefan Kuhr on
Hi Christoph,

On 3/30/2010 5:07 PM, Christoph Rupp wrote:
> Hi,
>
> I have a database library which uses memory mapped I/O to read pages
> (usually 64k) from the database file. If this file becomes huge, then
> i get above error on Win XP 32bit.
>
> I did some research about this and wanted to check with you what i
> found out. Also, i have some ideas for solutions and want to verify
> what is feasible.
>
> Here's a screenshot of my application in the task manager.
> (highlighted in blue)
> http://crupp.de/taskmanager.png
>
> From what i discovered, i'm hitting some wall regarding either paged
> or non-paged memory. I guess it's the non-paged, although the limits
> are quite low (450k). Am i right with that guess?
>
> My preferred solution (rather a workaround) for that problem is that i
> can somehow query the amount of available pool memory and then try not
> to exceed it (= set my internal caching limits). But i have not found
> a SDK function which gives me this setting. Is there such a function?
>
> I also discovered that i can change registry settings (or maybe even
> boot.ini?) to avoid that problem, but that's not an acceptable
> workaround for most of my users.
>
> Another solution would be to fall back to ReadFile()/WriteFile() when
> i hit this error.
>
> Opinions are very welcome.
>
> Thanks a lot
> Christoph
>

The amount of kernel object handles looks suspicious to me. Do you have
a handle leak? What kind of handles are these? NP memory usage for this
process looks high as well.

--
S