You Are Here:

Community: Wiki

 

Talk:How to find out the free memory in Java ME

From Forum Nokia Wiki

Reviewer Approved   

As title suggested, this article explained in very brief that how one can know before installing the application that how much flash memory is free so that user can rest assured when installing or adding other files.

Article used Basic Java's Runtime class method the get the available free memory. Differences amongst manufacturer to manufacture in counting free memory based on device specification and its VM Implementation.

Quality of Information is good to understand and specific.Code Specification becomes more useful when trying same while reading.

--Kalki 19:14, 14 September 2009 (UTC)



Level: basic

When you install any application (jar files) in your phone, first it checks the free memory available in your phone, and free memory is not available then it let us to delete some thing in our phone.So this can be retrieved by the code given in this article. This provides important thing and it can be used in every application.

--Vkmunjpara 17:49, 20 September 2009 (UTC)



@Vkmunjpara - this article shows how to find out how much free RAM is available, not disk/memory card space.

This code is useful in order to avoid OutOfMemory exceptions that can occur in Java when a Midlet tries to use more RAM than is currently available. As correctly stated, the method provided by the Runtime class can be misleading, because of the way the virtual machine works. If you use the device connection tool which comes with the S60 SDK for on-device debugging, you can clearly see how the heap size is increased when necessary. Obviously, this can only occur if there is still RAM available. In applications where a lot of memory is necessary (for example where you draw a lot of images), it is a good idea to check if there is enough RAM available. However, if you are running so close to the limit of the available RAM that you need to check, you should probably look at how to make more efficient use of memory in your application.

--Larry101 09:49, 21 September 2009 (UTC)

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia