You Are Here:

Community: Developer Discussion Boards

#1 Old VERY interesting discovery about Nokia 6230 RecordStore - 2004-05-28, 13:43

Join Date: Mar 2004
Posts: 10
mortem
Offline
Registered User
I am developing an applications with rather large persistent storage requirements, about 100 KB.

All posts on this forum and other documentation yield that the Series 40 platform support only 20KB of RMS storage.

However, I got suspicious when I tried saving these 100 KB in one RecordStore and discovered the following:

1) I tried to save 632 records. addRecord() returned RecordStoreFullException after 254 records, and getSize() returned 33 000 bytes. So, the 33KB far exceeds the 20 KB. Also getSizeAvailable() returned 1400 KB, so there should be plenty of space.

2) 254 is suspiciously close to 255 / 256, so I did the following:

When addRecord threw a RecordStoreFullException I moved on to a new RecordStore, when this got full I moved on to a third etc. The result was that I could store all 632 records amounting a total of approx 100 KB !

Thus, in the Nokia 6230, the number of records for each RecordStore seems to be the limit rather than the total amount of data (in the case of many entries, few bytes pr. entry).

FYI, comments / viewpoints appreciated.

//morten
Reply With Quote

#2 Old 2004-05-29, 18:47

Join Date: Dec 2003
Posts: 89
Location: Germany / Cologne
o66183
Offline
Regular Contributor
Nokia says programms should'nt be larger than 150 KB. We successfully installed a 400 KB programm. The only drawback is that you can't install it with Nokia software - only via OTA ?

Oliver
Reply With Quote

#3 Old 2004-08-02, 17:50

Join Date: Mar 2004
Posts: 2,079
Location: Bangalore,India
Send a message via MSN to mayankkedia Send a message via Yahoo to mayankkedia
mayankkedia's Avatar
mayankkedia
Offline
Forum Nokia Champion
this seems like a discovery to me as well..coz i was under the impression that there sure is a limit to the RMS size..though it varies from phone to phone..but then i still dont think that the limit would be defined by the number of records..coz it would not be a right indicator to the size of the data..dont u think?
ciao
Reply With Quote

#4 Old Memory limit for RecordStore(s) in 6230 - 2004-10-02, 11:03

Join Date: Sep 2004
Posts: 9
kawk
Offline
Registered User
After experimenting on a 6230, it appears to me that a single RecordStore can grow up to 32kByte, including some 48 byte common metadata plus 16 byte metadata for each record.
Furthermore memory for data seems to be allocated in chunks of 16 byte each.
A single record therefore may occupy 16 (no data), 32 (1 to 16 data bytes), 48 or other multiples of 16 byte in a RecordStore.
The maximum number of records in a single RecordStore then could be (32768-48)/16=2045 (if all records were empty), or (32768-48)/32=1022 (if all records contained 1 to 16 bytes data).

If a single RecordStore can't hold all the data you want to save, simply open another (with a different name).
For example, to record some data received continously, start with creating a RecordStore named after System.currentTimeMillis(), fill it until you get a RecordStoreException, create another etc.
That way I just managed to record a total of more than 1 MByte on a 6230.
Reply With Quote

#5 Old it's helpful - 2005-01-21, 02:36

Join Date: Jan 2004
Posts: 56
judyj2x
Offline
Regular Contributor
Hi Kawk,

Thanks for your informaiton. they are very helpful.

I have just met another problem with 6230's RecordStore.
My each record/object is around 300bytes, and I need to downlaod about at least 200 records averagly.

My problem is :
1: the REcordStore.addREcord pops out message as like this: javax.microedition.rms.RecordStoreException: error writing new record data. or *.allocateNewStorage space exception.
2: the RecordStoreaddRecord() never throw out RecordStoreFullException, even it's over 32kb, and somehow it can grow up to 35kb even with the above 'error writing new record data' exception .

Appreciate any hints and idea.

Thanks,
Judy
Reply With Quote

#6 Old Re: VERY interesting discovery about Nokia 6230 RecordStore - 2007-11-19, 15:24

Join Date: Oct 2007
Posts: 1
krecc
Offline
Registered User
Hi to all!

I think this info will be helpful. This problem found at Nokia 3110c (may be found at another devices). I'm trying to execute method recStore.addRecord(/* ... */), but no data written, and i'm catch exception "RecordStoreException: error writing new record data". I found solve: first, close ALL record stores before open ('n writing to to it) another; second, standard method recStore.closeRecordStore not works properly, its really not closing store at first time, i'm closing my "store" by this method:

boolean closed = false;
while (!closed) {
try {
store.closeRecordStore();
}
catch (RecordStoreNotOpenException e) {
closed = true;
}
}
System.gc();

so, i spend 4 days to solve problem. With best wishes =)
Last edited by krecc : 2007-11-19 at 17:14.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
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