I'm looking at the palmOne SDK 4.0 beta developer's guide
 documentation, and it says this,

 Performing a soft reset wipes the RAM clean and retrieves a fresh
 load of the rom from the NAND flash. A hard reset additionally erases
 the storage heap that is in the NAND flash.

 I assume this means that a soft reset wipes the *entire* RAM clean,
 including the DBCache. So as long as a soft reset doesn't sync the
 DBCache before rebooting, it seems like it should be good.

 Seems like you could test this by writing a simple app that writes
 one value to a PDB record, then syncs the cache, the writes another
 value. Then run that app and immediately do a soft reset before
 closing the database. (If you don't want to install the new palmOne
 SDK just to get access to the function that syncs the cache, the
 documentation says that going into sleep mode will sync the DBCache,
 so you should be able to write a record, pop up an alert, turn off
 the device and then turn it back on, and then dismiss the alert, and
 then have the program write a new record, then hit the reset button.)


Thanks Logan. I can now confirm this suggestion from a few sources. I wrote the program which does exactly what you suggested. The experiment has confirmed that DBCache is cleared during soft reset. Another thing that was confirmed, is that if the record is updated, but the DB is not closed (or it was not sync'd manually with DmSyncDatabase), the soft reset will discard latest changes done to the record. The latter thing is what one would expect after reading latest SDK documentation. I just had vague hopes that OS would flush cache to NVFS in idle time or something like that. Turns out it's not the case :(... I thought, I would share this with the list.


Boris

--
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to