Memory Problems in Windows 2003 Server
brad
byte8bits at gmail.com
Fri Oct 12 10:30:57 EDT 2007
amdescombes wrote:
> Hi,
>
> I am using Python 2.5.1
> I have an application that reads a file and generates a key in a
> dictionary for each line it reads. I have managed to read a 1GB file and
> generate more than 8 million keys on an Windows XP machine with only 1GB
> of memory and all works as expected. When I use the same program on a
> Windows 2003 Server with 2GB of RAM I start getting MemoryError exceptions!
> I have tried setting the IMAGE_FILE_LARGE_ADDRESS_AWARE on both
> Python.exe and Python25.dll and setting the /3GB flag on the boot.ini
> file to no avail. I still get the MemoryError exceptions.
>
> Has anybody encountered this problem before?
>
> Thanks in advance for any ideas/suggestions.
>
> Best Regards,
>
> André M. Descombes
I forgot to mention that the OS itself or other processes may be using a
lot of memory. So, just because you have 2GB, that does not mean you can
access all of that at once. I would guess that 25% of memory is in
constant use by the OS. So, do your IO/reads in smaller chunks similar
to the example I gave earlier.
Brad
More information about the Python-list
mailing list