Wince memory Adjustment

Source: Internet
Author: User

Custom wince memory. Memory Used by the wince system is divided into storage memory and program memory. Storage memory is used for object store, while program memory is used for program memory.

Object store (wince) refers to a storage space that can permanently store data. Even if the power is down, the data cannot be lost with the support of the backup power supply, achieve the effect of permanent storage. It is actually a piece of memory, generally including the file system, database and system registry. The maximum size of the object store cannot exceed 256 MB, and the maximum size of files contained is 32 MB. Object store is composed of many objects, which may be a file, a database, a database record, a registry key, and a key value.

In the object store, the wince system assigns an ID to each object, called ceoid. The ceoid of each object is unique in volume. Similarly, each volume in the object store also has an ID called ceguid, so that ceguid and ceoid can be used to find the corresponding object in the object store.

By the way, we will introduce a function:

Bool ceoidgetinfoex (pceguid, ceoid, ceoidinfo * poidinfo) calls this function to obtain information about an object in the object store. pceguid and OID are the ceguid and ceoid of the object to be searched, poidinfo indicates the object information.

So how to obtain the ceguid and ceoid? For different object types, there are different functions, as shown below:

Directory or file: findfirstfile (..)/findnextfile (..)/getfileinformationbyhandler (..)

Database: cecreatedatabaseex2 (...)/cefindnextdatabaseex (..)

Database record: ceseekdatabaseex (...)/cereadrecordpro1_x (...)/cewriterecordpro1_x (..)

Mounted database volume: cemountdbvol (...)/ceenumdbvolumes (..)

Therefore, in the wince system, the memory adjustment is to adjust the size of the object store and program memory. By default, storage memory/program memory accounts for half of each other. There are three ways to adjust the memory:

1. Adjust fsrampercent In the config. bib file. The specific settings are explained in the description of the bib file.

2. Call the poemcalcfspages function in oal to allocate memory for the object store.

3. After wince is started, enter the control panel of the system, open system, and select memory to adjust it on the interface.

4. Adjust it by using the setsystemmemorydivision (...) function. You can call getsystemmemorydivision (...) to obtain the memory usage of the current object store.

The adjustment of storage memory and program memory mainly depends on the system requirements. Generally, the storage memory does not need to be too large. you can adjust it as needed. However, you must note that neither of the two parts of the memory can be adjusted too small, which may lead to data loss or even crashes. At that time, you can only restart the system.

 

 

ObjectStore

Wince has two internal file systems: romonly and ramrom. The former sets Rom (NK. all files in BIN) are mapped to "/Windows", which also creates a ramfs and is generally mounted as root. The system registry in ramfs and Ram is called ObjectStore together. In addition, Ce also supports fatfs external file systems. Of course, you can also write your own installable file system. The general practice is to format the flash partition and mount it to a directory under root. Hive is implemented by setting the registry. I was troubled when I started wince4.2. Why don't I directly turn flash into root, just like Linux. In addition, the ObjectStore is always dizzy, mainly because the name is not good. In fact, a virtual ramdisk allows users to read and write files. In wm5.0, the default value is romfs, and the External Flash is used as the root. Instead of getting used to it, I want to change it to the 4.2 mode. It took four days for this change, and all the places that could be thought of were changed. No root exists unless flash is used as root. The ramfs does not know where to go. Finally, we can see on the wince blog that wm5.0 does not support ObjectStore. In other words, sysgen_fsramrom is the decoration of the deaf.

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.