![]() |
| Home |
|
|
RTFiles-32 Data TablesRTFiles-32 needs memory to store information about currently available drives, open files, and for its buffers. By default, RTFiles-32 allocates enough space for up to eight open files, eight logical drives, 32 sector buffers with 512 bytes each, zero 2048 byte buffers, and a 4k second level buffer cache (used to read several buffers in a single driver call). If CD-ROM support is required, an application must allocate at least 2 (8-32 are recommended) 2048 CD-ROM buffers using the method described below. To change the data table configuration, include the following lines in one of the application's source files: #define RTF_BUFFER_SIZE 512 #define RTCD_BUFFER_SIZE 2048 #define RTF_MAX_DRIVES 8 #define RTF_MAX_FILES 8 #define RTF_MAX_BUFFERS 32 #define RTCD_MAX_BUFFERS 0 #define RTF_L2CACHE_SIZE 8 #include <Rtfdata.c> and edit the respective constants to match your needs. If any of the given symbols is not defined, RTFiles-32 will apply its respective default displayed above. To be able to mount disks with a sector size larger than 512 bytes, RTF_BUFFER_SIZE must be increased. If RTF_BUFFER_SIZE is larger than RTCD_BUFFER_SIZE, RTCD_MAX_BUFFERS is set to zero automatically as the CD-ROM file stytem code will use the default buffers in this case. Example:The application will need to open up to 30 files simultaneously. At least two file handles should be reserved, because RTFiles-32 may need them internally. To improve performance with so many open files, the number of 512 byte buffers is increased to 256 and the CD-ROM buffers are set to 16: #define RTF_MAX_FILES 32 #define RTF_MAX_BUFFERS 256 #define RTCD_MAX_BUFFERS 16 #include <Rtfdata.c> To analyze an application's data needs, use functions RTFBufferInfo and RTFDumpFileTable. Function RTFAddBuffers can be used to dynamically increase the sector buffer cache size at run-time.
|