Showing posts with label Memory. Show all posts
Showing posts with label Memory. Show all posts

Thursday, August 16, 2007

WM5 Maximum Storage Card Capacity

Most of the Windows Mobile 5 devices that I've used including the T-Mobile MDA, SDA, and Cingular 2125 use miniSD flash storage. The Samsung Blackjack, however, uses microSD. With ever-increasing storage capacities available in these formats, I was curious if there was an upper capacity bound on WM5 devices. It looks like the internets are mixed on this one.

This post by Mike Calligaro on the Windows Mobile blog points out that most cards and card readers available (at least on Jan 1st, 2007) follow the SD Spec 1.1, which maxes out at 2 gigabytes. Here's an excerpt,

"Up to 2G, the only negative to larger storage cards is that they cost more. They don't burn any more power than smaller ones and they're not inherently any slower than smaller ones. I've used 2G cards in my Windows Mobile devices, and they work fine. Unfortunately, 4G and larger cards aren't likely to work yet.

Most cards and card readers out there follow the 1.1 version of the SD specification. That spec maxed out with 2G cards. There's a new 2.0 version of the spec that allows for larger cards, but Windows Mobile currently doesn't support SD 2.0. Even though we don't explicitly support SD 2.0, it's possible for our OEMs to add support themselves (I don't know if any have). So if you've got a Windows Mobile device that's able to read 4G SD cards, you don't have to call me a liar. Ignorant, yes. Liar, no."

Riki commented on this blog entry, however, and said:

"The maximum capacity of SD card is 2GB under SD 1.1 of SD spec; however, by using FAT32, many SD 1.1 host devices can use 4GB SD cards. SD 1.0/1.1 uses traditional “Byte Addressing” scheme which limits the maximum capacity to 4GB while SD 2.0 adopts “Sector Addressing” scheme."

So it looks like when purchasing new SD memory for a WM5 device, you should go with 2 gigabyte cards--those are guaranteed to work. However, some devices may support 4 gigabytes and up, especially if the OEM implemented the SD 2.0 Spec.

On a related note, my advisor found two programs that turn a WM5 device into a USB SD reader. I haven't used either of these, so I cannot comment on them:
http://www.softick.com/pocket-pc/cardexport2/
http://www.modaco.com/WM5torage-t238545.html

Friday, July 22, 2005

Obtaining Memory Status w/C#

6.5. How do I determine how much memory a device has available?

You can P/Invoke the GetSystemMemoryDivision and GlobalMemorySystem functions to determine how the memory is divided and allocated between program and storage. Definitions of the parameters can be found in the API reference documentation.

from our friendly Smart Client Developer FAQ on msdn.

Saturday, July 16, 2005

Overview of .NET Compact Framework Garbage Collection

What are the ramifications of calling GC.Collect()?

You’ve probably heard the old wisdom “Yes, there is an API you can use to force a garbage collection, but don’t ever call it – the garbage collector can do a better job on its own”. Here’s the thinking behind that statement:
Garbage collection is a relatively expensive operation. As we’ve seen, a collection involves “suspending” threads, traversing object graphs, moving blocks of memory around and so on. Each time you force a collection, you’re forcing the Compact CLR to, at a minimum, get all threads to a state in which a collection can start, and scan the object graph looking for unused objects. Clearly, calling GC.Collect() repeatedly will have a seriously negative performance impact. The Compact Framework’s collector will kick in automatically after 750KB of objects have been created. As such, collections do happen occasionally - they don’t only happen when memory is exhausted. Furthermore, when a call to GC.Collect() returns, you can’t be guaranteed that all object finalizers have finished running. As a result, you cannot force a collection in hopes of deterministically finalizing a particular object (use the Dispose pattern to deterministically free resources associated with an object). That said, it is possible that you may have a scenario in which you’ll benefit by initiating collections yourself. If you believe you have such a scenario, feel free to try it, but be aware of the implications and measure performance carefully to make sure you’re not doing more harm than good.


from Steven Pratschner's .Net CF WebLog - link to above article can be found here.