[PythonCE] ImportError problem

Ulrich Eckhardt eckhardt at satorlaser.com
Thu Jul 7 12:36:15 CEST 2005


On Thursday 07 July 2005 11:38, Mark Doukidis wrote:
> I have a PythonCE program that loads about 2.5MB of pickles
> (about 10 dictionaries with a total of 20,000 objects)
> that when running uses about 15MB of "storage".
> [...]
> ImportError: DLL load failed: Not enough storage is available to
> complete this operation.
> [...]
> I have plenty of "free" storage. I have been thinking:
> - Are there other "limited" resources I am consuming ?

Windows CE<5 has a fixed limit of 32MiB memory for each process. CE5 has ~ 
twice that much, because it loads all DLLs into one such 32MiB range and each 
process into another. There are ways around it, but things like malloc() and 
free() don't do them automatically.

> - Does PythonCE need to be compiled especially for Windows Mobile
> Second Edition ?

Dunno, maybe building it size-optimized would help.

> - Does DLL loading consume special resources (me think maybe) ?

Yes, memory. Also, the virtual load address is the same for each process, so 
this may present an additional overhead - I'm not that sure about the 
internals of CE.

> - Do XDAs have special requirements ?

No idea.

Do smaller amounts of data also trigger this error? If so, I'd rule out memory 
shortage. Other than that, I'd use ProcessView[1] or similar to find out 
what's going on and who's using how much of memory; maybe just removing some 
unused parts is enough.
I could dream up a few possible solutions, but I'm not really that confident 
with CE so I will shut up for now instead of pretending I knew stuff. Good 
luck, nonetheless.

Uli

[1] I don't remember the exact name, it's a tool that comes with evc4 or 
platform builder.


More information about the PythonCE mailing list