Hello,

I am desperately trying to find a way to clear the DB Cache on a T5 back to the 
same state as a SysReset(). This must be possible as the Hotsync application 
manages it. Has anyone figured out a way to do it?

FYI some background on my problem is:-
I am developing an application that accesses lots of large pdb's (although all 
under 5MB each), and locks down ptr's to their records. I can alwasy access the 
1st couple of databases without error, but once the cache is full it seems like 
the OS cannot clear it within the application. 

As a test I loop through my databases and:-
1) Open the database
2) For each record call DmGetRecord()
3) Lock and then Unlock the record
4) Call DmReleaseRecord() with the dirty flag always false.
5) Close the database

However, once I have accessed more than 10MB of data the DmGetRecord calls 
always fail. No single database is more than 3MB in this test, and I only ever 
have one database open at a time. If I clear the cache between each database 
all works, but the only way I know of doing this is SysReset or a HotSync.

The more I look into this the more it appears to be a bug with the OS's 
clearing cache routines. It is as if it won't clear the records I have accessed 
from the cache although I have called, DmReleaseRecord and even closed the 
database. Is anybody else seeing similar results?

Many Thanks,

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

Reply via email to