• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

RMS Size allocated for the midlet

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
Is there a way to know how much of RMS is allocated to my MIDlet when i install it on a phone and run it?

I basically want to let my RecordStores to grow depending upon the available size, they wud grow less if the available space is less and wud grow more if the space is more.

Thanks in advance....
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check method getSizeAvailable() of class RecordStore
 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amount of RMS space allocated (Reserved) depends on MIDlet-Data-Size attribute in the JAD file.

If that attribute is not specified, default value of 0 is assumed.

However RMS size used by the MIDlet can grow beyond the reserved space.
You will get minimum of RMS space reserved ONLY for your MIDlet for sure, beyond that is implementation dependent.

You could use method(not sure getSizeAvailable()...) to get the remaining free space and take decesion based on that.
 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a whole lot of interesting stuff in Midlet-Data-Size attribute...

But would the system downsize our request, if we specified a higher value than thats available on the device..
(something similar to what happens to baudrate)

Thanks for the notion of reserving space for our future data...this seems great to me
 
reply
    Bookmark Topic Watch Topic
  • New Topic