×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    188

    Question Maximum RMS size

    Hi All,

    If I run the below code in a device then what it will return

    private RecordStore rs = RecordStore.openRecordStore("Student", true);
    long size =rs.getSizeAvailable() + rs.getSize();

    What will be the value of size here? Is it the maximum size of RMS named as "Student", or maximum size of the RMS of device.

    If it will give the maximum size of the RMS of device then what will happen if I am going to store the data of amount more than the maximum size of the RMS of device?

    Please help me....

    Thanks & Regards
    Ajit

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Maximum RMS size

    Quote Originally Posted by ajitkumar26 View Post
    Is it the maximum size of RMS named as "Student", or maximum size of the RMS of device.
    It is the maximum amount of data you can add to the record store "Student". However, if you add data to another record store, the amount you can add to this one might drop.

    Quote Originally Posted by ajitkumar26 View Post
    what will happen if I am going to store the data of amount more than the maximum size of the RMS of device?
    A call to addRecord() or setRecord() will throw a RecordStoreFullException.

    If you want to reserve RMS space for your application when it is installed, specify a MIDlet-Data-Size in your JAD or MANIFEST.

    Graham.

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    188

    Re: Maximum RMS size

    Quote Originally Posted by grahamhughes View Post
    It is the maximum amount of data you can add to the record store "Student". However, if you add data to another record store, the amount you can add to this one might drop.



    A call to addRecord() or setRecord() will throw a RecordStoreFullException.

    If you want to reserve RMS space for your application when it is installed, specify a MIDlet-Data-Size in your JAD or MANIFEST.

    Graham.
    Thanks Grahm for your reply...

    Is there any limit on to set the MIDlet-Data-Size in JAD?

    Thanks & Regards,
    Ajit

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Maximum RMS size

    I guess About the RMS there must be some limits, please remember that this is the memory that the application reserve for itself.Please read this para.

    MIDlet-Data-Size

    The minimum number of bytes of persistent data required by the MIDlet. The device may provide additional storage according to its own policy. The default is zero
    I guess now this will be clear.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Regular Contributor
    Join Date
    May 2010
    Posts
    94

    Smile Re: Maximum RMS size

    try this.

    str1=new StringItem("Phone Memory",Runtime.getRuntime().totalMemory()+" KB");
    str2=new StringItem("Free Memory", Runtime.getRuntime().freeMemory()+" KB");
    str4=new StringItem("Used Memory ", (Runtime.getRuntime().totalMemory()-Runtime.getRuntime().freeMemory()+" KB"));

  6. #6
    Registered User
    Join Date
    Nov 2009
    Posts
    188

    Re: Maximum RMS size

    Quote Originally Posted by nitinverma274 View Post
    try this.

    str1=new StringItem("Phone Memory",Runtime.getRuntime().totalMemory()+" KB");
    str2=new StringItem("Free Memory", Runtime.getRuntime().freeMemory()+" KB");
    str4=new StringItem("Used Memory ", (Runtime.getRuntime().totalMemory()-Runtime.getRuntime().freeMemory()+" KB"));
    Thanks for your reply...

    What all above is about the heap memory.
    This is not what the RMS size.

    Thanks & Regards,
    Ajit

  7. #7
    Registered User
    Join Date
    Nov 2009
    Posts
    188

    Re: Maximum RMS size

    Quote Originally Posted by raj_J2ME View Post
    I guess About the RMS there must be some limits, please remember that this is the memory that the application reserve for itself.Please read this para.



    I guess now this will be clear.
    Hi Raj,

    Can we know the maximum limit of RMS for a device?


    Thanks & Regards,
    Ajit

  8. #8
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Maximum RMS size

    Quote Originally Posted by ajitkumar26 View Post
    Is there any limit on to set the MIDlet-Data-Size in JAD?
    Be careful not to make it too big. If the device cannot provide the amount of space you ask for in MIDlet-Data-Size, then the application will not install. It is most useful for applications that have a relatively fixed need for data storage. For example, a game that stores some user options (sound on/off, etc) and ten high-scores. Such a game probably cannot run at all without, say, 4k of RMS space, but will never need more. Reserving the space through MIDlet-Data-Size means that the application will not install for users who will not be able to use it (the installation process will advise the user to free some space and try again), and saves the developer from having to deal with RecordStoreFullExceptions.

    Yes, some devices have a fixed limit. For Series 60 devices, the limit is determined by the free space on the device. For Series 40 devices, there will be some fixed, per-application size. This varies from device to device. Unfortunately, it is not usually documented in the device specifications. All Series 40s provide at least 20k. Most provide significantly more.

    Graham.

Similar Threads

  1. Minimum & Maximum Size of Jar and Jad
    By J2meDeveloper in forum Mobile Java General
    Replies: 10
    Last Post: 2009-06-18, 15:29
  2. RMS size limit Nokia 5140
    By fuji6 in forum Mobile Java General
    Replies: 4
    Last Post: 2005-09-07, 03:22
  3. Maximum size for DRM content ?
    By evgeni_popov in forum Digital Rights Management & Content Downloading
    Replies: 0
    Last Post: 2004-08-13, 09:27
  4. RMS SIZE on S60
    By jerykaren in forum Mobile Java General
    Replies: 2
    Last Post: 2004-07-30, 10:08
  5. Maximum JAR size for Nokia 3510i
    By LiamQ in forum Mobile Java General
    Replies: 1
    Last Post: 2002-10-23, 11:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×