PDA

Click to See Complete Forum and Search --> : Apllication Memory Usage


Mike Hildner
Jan 7th, 2005, 03:17 PM
Someone just asked me how much memory my application uses. It's written in .NET Compact Framework running on Pocket PC 2003. Never even looked at memory usage.

It's what I'd consider a fairly simple app. One form, a few controls - text boxes, labels, a tab control, menu. Uses sockets as well.

Just starting up, without even connecting the socket, it uses almost 3 MB of memory. I haven't started to attempt to make it more effecient yet. Just wondering what people think - is that a lot of memory to use? Seems to me it is.

Any thoughts are appreciated.

Mike

Mike Hildner
Jan 7th, 2005, 10:02 PM
So I looked at some apps like File Explorer, and they were using about .2 MB. A default C# Smart Device Application uses about 1.5 MB. My app uses 2.2 on start up. I guess that's not too bad.

Shaggy Hiker
Jan 8th, 2005, 01:48 PM
How much of that is the framework itself?

Mike Hildner
Jan 8th, 2005, 06:39 PM
That's a good question, I'm not sure how to tell. Not sure if it even makes a difference for my needs. We're trying to squeeze a bunch of apps (mine, encryption, et. al.) on a PDA, and need to come up with memory requirements.

Hope I don't have to re-write in eC++.

After googling a bit, still haven't found a way to tell, but this article (http://weblogs.asp.net/mikezintel/archive/2004/12/08/278153.aspx) is pretty interesting.

Shaggy Hiker
Jan 10th, 2005, 11:50 AM
I remember reading something about how the size of the .NET framework was reduced in size for the CF. I think it was in a Microsoft book, but it might have been on the MS web site somewhere. In any event, I remember the size of the CF was over 1 MB, and might have been over 2 MB. Therefore, if the total memory footprint of your program is not much above 2 MB, it might be mostly the CF.

I would expect that the CF would only load once, though. Therefore, it seems like you could write some trivial little program, and install it along with the one you want to test. Running the first one would load the CF, while running the second one would not re-load the CF. Whether or not you could determine the size of your non-CF program by subtracting memory usage between the two, I'm not sure.

Mike Hildner
Jan 10th, 2005, 11:54 AM
I think you're right about that. If you read that article I posted the link to above, it goes through what happens with the first application and subsequent applications.

Was just a little embarassing when we're trying to squeeze a bunch of apps on one PDA, and my app is by far the largest. Oh well. I'm using the CF and that's the way it is.

Shaggy Hiker
Jan 10th, 2005, 02:02 PM
I'm looking at deploying to SD cards. Memory should be cheap these days.