Sunday, January 15, 2006

Avoid crashing into the new Palm with NVFS (II)

Any explanation that it was like being organized on the internal memory of the earlier Palm, and they bring the new System NVFS, trying to explain the existence of the DbCache.

In short, the DbCache is the area of RAM in which the files are copied from one application each time we ran one, since the executable files can not operate directly in flash memory that is used for storage at the Palm with NVFS . If you have not heard anything, it is because you tried to skip the first part of this post. The conclusion is that, however much memory you have a Palm, the data that uses a program can not occupy more space in your DbCache. An example? You have a Tungsten E2, with 10Mb free memory space and 4Mb in the Dynamic Heap, but your DbCache has only 2Mb free. Loads a program that consumes 3Mb. Result: Your E2 crashes. It's that simple.

Of course, should never come to this. My E2 nothing else to do a soft reset is about 5Mb of DbCache free. I run a large program and to 2Mb drops, but as soon as you leave that program, PalmOS release that memory and again I have 5Mb for the next application. Spending this? Not really. PalmOS DbCache not released until it is not necessary, to avoid slow downs. What is the problem: that the cleaning of the DbCache not always work as it should.

The most unstable Palm were the first that came with the NVFS: the Treo 650 and Tungsten T5. But some time ago that the home page of Palm updates that improve these points, so if you have not updated your computers are not you hope for. Now, with the normal use does not usually have problems. But when we open such a large file with many images within Plucker, or charge a big game, such as GameboyColor in the LJP, or the Day of the Tentacle in ScummVM, if we do not have 2 or 3Mb free in the DbCache is certain that we hang the Palm.

And what can we do to fix this? Fortunately Hiroaki Imazeki created DbCacheTool. I do not know if the program page will help you much as it is in Japanese, but I've compiled enough information on this program in the months I have been researching the subject. The program you can download by clicking on the link below for the entire page. This application monitors the level of DbCache freedom that exists in every moment, and we can set it so that when this lower level of a certain threshold we decide, for whatever method you know (it is assumed that you can load a program very big and little by little then download it from memory) release all DbCache I can. The process takes about 15 seconds.


The configuration of DbCacheTool

Once installed this software, we can run it. It consists of a single window that is where everything is set. Step is to explain what each thing:

  • Cache Size is the size of our DbCache Palm, while Free indicates how much of this memory is currently free. But MaxAlloc is the size of the largest contiguous block of memory is free. And is that a large program may not use anything more than this amount, because it can be loaded on several holes. So this value, which is the smallest of the three, is the most interest us.
  • Clear Type gives us to choose which method to use to free up memory. Will choose between DB (which is the method I explained here) Sync and the truth I did not know that it is achieved, although it is assumed that liberating the DbCache during Hotsync.
  • Auto Clear means if the program does anything or not. It's the switch.
  • In Apps ... can define settings for one program in particular, for example, for programs that require lots of RAM.
  • And now we have to decide when to check the DbCache:
    • App Stop: when we get out of an application.
    • Ctrl Tap: within an application, every time you press a button.
    • First Open form: when we open an application. This option is available only for the configuration of a program specifically.
    • Dequeue event: the setup for a program in cocnreto activates or deactivates DbCache to do something or not.
  • Ask at soft reset gives us the option to ask if the program is started or not to make soft reset, to avoid problems if it does not let us start the Palm. Clear at soft reset would make the program every time we do a reset, so start with the DbCache as empty as possible.
  • Finally, it means free from that value (in Mb), if the DbCache has less space than those named, will try to release more; max is the same, but relative to the size of the contiguous block of free memory bigger.

This is what it means everything but now give What values? You can say that normally with 2Mb of free DbCache almost all programs will load fine. One thing that I noticed is that although the executed frees DbCache lot, which does not increase the size of the largest free slot, which is also where we are really limited. So if it is done very little that will reset the Palm to release this memory again. The DbCacheTool addition to the program itself, brings a Desktop Assistant (DA) which is a kind of Hack for PalmOS 5. If you instaláis the DALauncher for example, can charge this DA, and in the command bar that comes when you do a diagonal line (typical for copy, paste, etc.). You will see the option to see the status of the DbCache, what which is very convenient.

Values that I have posts at present: after several tests, as you see what I have left in the catch. 4MB of total and 0MB of max. QuÚ Why? the max I do not care, because when it is very small so I will not be able to increase, the program does not work. So I look at the free, the total value, if lower 4Mb, the max does not fall from about 3Mb, because the two often go hand in hand ALUES. It is difficult to explain how this works, we need to install it and see how low the DbCache according to the programs and decide the value that we need more. If we put a very low threshold, we can fill the DbCache with a big crash and the Palm. If we put a very high threshold, the program will be run very often and is a nuisance.

As you can see this solution is compromise, but it can work very well. You need a process of trial and error, but with this and other programs that I will discuss in the next post we have a Palm solid as a rock. I know it is hard to digest, but I strongly recommend that you read it in stride, because it works.

Posts in this series:


Related Articles

21 comments on "Avoiding crashing into the new Palm with NVFS (II)"


Pages: [1] 2 3 »

Pages: [1] 2 3 »

Leave a comment


Labels valid: <a href="" title=""> <ABBR title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <'s datetime = "" > <em> <i> <q Cite=""> <strike> <strong>

Akismet has protected and in this blog of thousands of fraudulent reviews. But if your comment filtered by mistake please let me know by e-mail contact from the right.