Memory Issues with loading DLLs

D

devgrt

This is a repost/consolidation of an odd problem I have:

PocketPC 2003 C# .NetCF 1.1
-We use CFCOM to wrap a large ActiveX control (MapInfo)
-That control reads a large amount of data from the SDCard
-Once that control is instantiated and reads its data we can no longer load
any DLLs or if they do load they fail (MissingMethodException)
-If we comment out the control then DLLs work fine
-the odd thing is that it only happens on Dell Axim x50 with WinCE 4.2 (if
we use the same app/dlls on any other PDA (we tried four other types) or
even on the same Dell but with Windows Mobile 5.0 it all works great.)

Thanks for any ideas you may have!
 
I

Ilya Tumanov [MS]

You probably running out of memory, most likely hitting 32MB virtual memory
limit. You can try loading these DLLs (by P/Invoking them) before using huge
AX, but that might lead to AX failure.

You can also call GC.Collect() and GC.WaitForPendingFinalizers() to force
NETCF to release some memory used up by garbage.



As to why it's failing only on PPC 2003 - they have different amount of RAM
available. PPC 03 uses RAM as storage while in WM 5.0 all RAM is available
to applications and storage is done on flash only.

They also have different stuff loaded into application space which can
change amount of available virtual memory.

You can P/Invoke GlobalMemoryStatus() to see which memory is low for this
proceeds.



--
Best regards,



Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
D

devgrt

Hi --
Thanks for your info!
Would this happen if we had an app compiled for PocketPC2003 running ona WM5
device (that is, is it the device that makes the difefrence or the app
compiled as PPC vs WM5)?
Thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top