[python-win32] How to calc amount of avail RAM in a process ?

Steven James steven.james at gmail.com
Thu Jan 29 13:18:06 CET 2009


For the display of bitmaps, most apps take the approach of creating
(sometimes multiple) low-res versions of the images, then swapping out so
that only what you need at the moment is loaded in to memory. For instance,
create a 50x50 version, a 100x100 version, and a 500x500 version. Only load
the 500x500 when you are zoomed in enough to see the detail in it.
Then again, on 64-bit windows, with 64-bit python, you can theoretically
address 8TB of memory per-process.

Steven

On Thu, Jan 29, 2009 at 2:13 AM, geoff <imageguy1206 at gmail.com> wrote:

> I am hoping someone could steer me in the right direction on how to
> calculate the amount of RAM available to a process.
>
> I found the post below from Tim Roberts - a belated thanks Tim for
> your patient responses ! and it seems we regularly hit this limit.
>
> We have an application that needs to display a large number of bitmaps
> (ie 100+) at one time.  Currently we are just reading the file and
> storing as a wx.Image in RAM.  I would seem we are hitting the 2.0G
> limited mentioned in the post below and I am wondering if there is
> some strategy we could use to go beyond this -- other than thumbnails
> and reading as necessary from the filesystem.
>
> At minimum though I would like to be able to 'prompt' the user to
> close some applications (ie mail clients, spreadsheets, etc) to free
> up some more space before our process starts.
> --- or would that even make a difference ?
>
> Any on the above (or the post below), help, advice, guidance would be
> greatly appreciated.
>
> <old post>
> Original Date: July 18th, 2005, 02:38 PM
> No, a user-mode process in Windows is limited to 2GB of address space.
> Addresses 80000000 and larger are kernel space. You can change the
> threshhold to 3GB by using the /3gb boot.ini switch, but few do so.
>
> You can certainly have more than 2GB of physical RAM in your machine, but a
> single process cannot use more than 2GB at a time.
> --
> - Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc
> </old post>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090129/abc85c73/attachment.htm>


More information about the python-win32 mailing list