SWRA657 June 2020 CC3100 , CC3200
To make use of the file system to store files, it is essential to be able to accurately calculate the occupied memory space per file. The total occupied size on flash is a function of the file content length (or the maximum size upon creation), file attributes and file system metadata.
Figure 1 describes the process for calculating how much memory is actually consumed on the serial flash.
File Size (bytes) | Page Size | Round to Page | Add Header and Round to Block | Allocated Size via sl_FsGetInfo() |
---|---|---|---|---|
10 | 256 | 256 (1 page) | 4096 (1 block) | 3656 |
250000 | 1024 | 250880 (245 pages) | 253952 (62 blocks) | 253512 |
1000000 | 4096 | 1003520 (245 pages) | 1007616 (246 blocks) | 10007176 |