Agreed, but PDH can give per-process statistics, too. For high-memory-usage apps, I would think that it would be nice for your app to know whether it is *likely* to need to swap out (by comparing needed memory to availably physical memory). Anyway, using the same API, you can determine how much memory space your own app is currently using, which was the original question. Probably clunky, but as I said, I'm not an expert. like so..... http://soundstripe.net/node/62
Steven On Thu, Jan 29, 2009 at 2:04 PM, Tim Roberts <t...@probo.com> wrote: > Steven James wrote: > > Not an expert on this, but googling "win32 performance counters" led > > me here: > > > > http://msdn.microsoft.com/en-us/library/aa373193(VS.85).aspx > > <http://msdn.microsoft.com/en-us/library/aa373193%28VS.85%29.aspx> > > > > Should let you get the available physical memory in the system. Not > > sure that you can specify to Windows that you want physical memory > > when you create the image objects, but it might be OK as a rough guide > > of whether there is memory available or not. > > No, that's useless for this purpose. Windows is a virtual memory > system. Even if you only have 256MB of physical RAM, your process can > still allocate up to 2GB of memory. > > -- > Tim Roberts, t...@probo.com > Providenza & Boekelheide, Inc. > > _______________________________________________ > python-win32 mailing list > python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 >
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32