Why can't I use the whole memory of my flash card for my files?
FAQ #101558
When using a memory module with a file system the available memory for the files is smaller than the specified size of the module. This FAQ explains what for the "not usable" memory is used.
Symptom
When storing files on a file system from a memory module or to a file system on the PCD itself (e.g. the INTFLASH from a PCD3 Compact) the total size of all files which can be stored is smaller than the specified size of the memory.
If e.g. a memory is defined with 1 MByte, it is possible that I can only store 866 kByte to the file system on this memory module.
Reason
The reasons for this phenomenon are the following:
- Memory management
Some of the memory is used for the management of the file system itself (for that the firmware "knows" where to find the files which are stored).
Example: On a "blue" memory module such as the PCD7.R550, R551 or R561, the size for this internal ornanization data is 64 kByte. - Memory reserved for compress task
Aditionally there is one sector of the memory reserved for the compressing task. During this task, the PCD needs to copy data from the sectors to be compressed to this reserved memory.
Example: On a "blue memory module" such as the PCD7.R550, R551 or R561, the size of this sector used for compressing the flash is 64 kByte - Every file needs at least one "block" of memory
The files located in the memory are stored in blocks, and a block can only contain data from one file. This means that as soon as a file is generated (even if the size is just 8 bytes), the whole block can not be re-used for another file.
Example: This leads to the fact that e.g. 10 files with one character in it (which would be 10 bytes in total) will use 10 blocks (which is around 10 kByte on the INTFLASH of a PCD1.M2xxx or a "blue flash module").
The amount of "unusable" memory is depending on the number of files and the block size of the file system. In maximum the "unusable" memory is the number of files multiplied with the block size.
This rules apply to all file systems on memory modules and on the INTFLASH (if available). These are:
- PCD1.M2xxx (INTFLASH)
- PCD2.R6000
- PCD3.R550, PCD3.R551, PCD3.R561
- PCD3.R600
- PCD7.R550, PCD7.R551, PCD7.R561
- INTFLASH of a PCD3 Compact or a PCD1.M2
Categories
PCD7 / Rxxx
PCD3 / Rxxx
PCD2 / Rxxx
PCD1 / M2xx0
Last update: 30.05.2015 15:15
First release: 31.01.2011 07:30
Views: 34646