• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMS Size allocated for the midlet

 
Prerit Singhal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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....
 
adam babol
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check method getSizeAvailable() of class RecordStore
 
Girish Nagaraj
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • 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.
 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic